This happens when the pressure reaches 150psi or when the temperature reaches 210 degrees. Usually, though, with an RV water heater, it is the high pressure that causes the relief. If this is something new, it is best to work out which of the two conditions is causing the relief. You can do this with a pressure gauge and a thermometer, but usually you can tell which it is by the way it is discharging -- a short discharge usually indicates a pressure relief and a long, continual discharge usually indicates a temperature relief -- this is assuming that your source water pressure is less than 150psi, which it almost always will be.
When the water heats, the system pressure increases, no matter what you do. Some systems will increase on the hot side only and some will increase on the cold side, also, depending on the presence and/or placement of check valves. The amount of reserve space (air pocket) in the tank should be maximized and maintained to minimize the pressure increase when the water is heated. That's the best you can do without installing an expansion tank.
Now, if your temperature is at or above 210 degrees, there's nothing you can do except have a professional service it, but for the short term, work out which fuel mode (electric, gas) is causing the high temperature condition and make sure the heater is set to the mode that will not overheat the water. Hopefully one or the other will work properly.
Bruce
2010 Skyline Nomad 297 Bunk House, 33-1/4 feet long
2015 Silverado 3500HD LTZ 4x4, 6.0 liter long bed with 4.10 rear, 3885# payload
Reese Straight-Line 1200# WD with built-in sway control
DirecTV -- SWM Slimline dish on tripod, DVR and two H25 receivers