The "ground" discussed here has nothing to do with connecting the house to Mother Earth. Rather, we are concerned with BONDING. That is, making sure that anything electric has a good, solid, low-resistance path for any 'lost' electricity to find its' way back 'home.'

In this case, 'home' is the transformer that made the electricity, and the path is through the ground wire to the service connection with the service neutral. Ground rods are irrelevant to this issue.

Somehow you're getting power to the pump. That's where you connect your green wire to the motor's ground lug.

Now, it IS possible your pump is also used on some pool equipment, so it might have a ground lug outside the wiring compartment. This is for also bonding the motor to the equipotential grid .... or, actually, for connecting the grid to the house grounding network. That exterior lug is already connected to the motor's frame. You can also use this lug to bond any metal frame, tub, etc., to the bonding network- those items ought to have lugs of their own, and you simply connect together them with a bit of wire.