Provided the warm water tank is rented together with the apartment and is part of the apartment´s equipment, it is the landlord´s responsibility to repair or renew it. This generally applies to all rent contracts on rental apartments in pre-WW2 residential buildings which were built before 1945, for subsidized new buildings which were built after the second world war and for owner-occupied flats built after 1945.
There is an exception for apartments in detached houses and semi-detached houses as well as holiday flats and service accommodations. Here, the obligation of maintenance of the landlord for warm water tanks can be changed contractually under certain circumstances.
Do not confuse the maintenance of the warm water tank with its servicing. The tenant is responsible for this and must inform the landlord immediately after gaining knowledge of the damage and to request a repair.