Easiest way is to use a Spatial node that's positioned in the dead center of the planet. Make the camera a child of this node and move it along the z axis so it's outside of the planet, looking towards the center of the planet.
Now you can rotate that spatial node around its x axis by the amount proportional to vertical input delta, and around its y axis proportionally to horizontal input delta. To move the camera closer/farther simply move it along its local z axis.
This is basically doing polar coordinates but without using math, just via node setup.