I modeled the octopus and I am working on rigging.
I applied IK constraints to the legs and the direction in which they bend is as shown in the GIF.
This is generally good.
However, my octopus sometimes walks upright, so my legs need to bend in the opposite direction.
Can I reverse the bend direction of the IK constraint?
I tried to move the pole target in the opposite direction, but it creates a vortex. If it wasn't possible, did I have to straighten the octopus' legs in the modeling phase in the first place?
Following moonboots' answer, I replaced IK with Stretch To.
The results seem to work fine.
When I move the pelvis of my octopus, I can attach its legs to the ground and freely set the bending direction of the knees.