The rule
Appliances have to be located so people can get to them for repair or replacement. That means clearance to take the appliance out, clean it, replace parts such as controls and vent connections, and adjust burners and pilots.
Unless something else is specified, the working space is at least 30 inches deep, wide and tall. In practice it's measured in front of the part you service, so the controls and burner access panel aren't facing a wall.
For attic installations, the passageway and working area follow Section 508.4 instead.
On the job
- Set the heater so the controls face the open side, then check you can reach the drain, the shutoffs and the relief valve without moving anything.
- Don't shelve in front of the heater. Storage in the working space is a common correction.
- The manufacturer's instructions often ask for more clearance than the code's floor. Use whichever is greater.
The inspector and your city's adopted edition have the final word.