680-6(b)lighting fixtures etc
(2)existing lighting fixtures and lighting outlets located less than 5 ft measured horoizontaly from the inside walls of a pool shall be at least 5 ft above the surface of the maximum water level, shall be rigidly attached to the existing structure, and shall be protected by a groundfault circuit interupter.
(c)switching devices. switching devices on the property shall be located at least 5 ft horizontally from the inside walls of a pool unless separated from the pool by a solid fence, wall, or other permanent barrier.
680-10. underground wiring location. underground wiring shall not be permitted under the pool or within the area extending 5ft horizontally from the inside wall of the pool.

this is only a sampling of the code. it seems that you could use another source other than the panel but there is yet another code in this section which requires no less than a #12 ground wire.
do you have access to a code book? if not i would check with your local library. swiming pools are extremely dangerous places with regards to electricity.