Can't seem to limit rotation on bones which are part of an IK chain

I know of two ways to limit rotation: 1. Click the lock icons in Pose Mode. 2. Add a bone constraint.
But it seems that neither of those methods work for bones that are in an IK chain.
What crucial piece of knowledge am I missing?

I want IK to be calculated for a robotic foot and leg, but being inorganic I need to limit its range of motion.

Thanks

IK bones obey different rotation restrictions. You can set up the limits and/or lock axes in the bone’s object data, Inverse Kinematics panel in pose mode.

Found it! Thank you, Stan.