This outlines a process for clearing IP address allocations with Whereabouts manually. This clears all allocations, you could be more surgical about it, however, this is efficient if it's possible.
NOTE I have another procedure somewhere which has fancy bash commands to make this easier, and is fully tested, however, in theory this "should just work" (you've heard that before)
- Stop all pods which use Multus + Whereabouts (if possible)
- Clear IP allocations
- Start any pods which use Multus + Whereabouts.
Step 1 and 3 are hopefully intuitive and are done in order to avoid possible inconsistencies.
For step 2:
oc get crds | grep -i whereabouts
This should result in two CRDs, overlappingrangeipreservations.whereabouts.cni.cncf.io
and ippools.whereabouts.cni.cncf.io
For each of those, perform:
oc get overlappingrangeipreservations.whereabouts.cni.cncf.io -A
and then with each item there.
oc delete $names-from-above -n $namespace-here
Repeat with ippools.whereabouts.cni.cncf.io
Thanks Doug! This worked great, one nit the
oc delete
needs the crd name. Here is a quick way I deleted the bunch:oc delete overlappingrangeipreservations.whereabouts.cni.cncf.io ` oc get overlappingrangeipreservations.whereabouts.cni.cncf.io -A | awk '{print "-n",$1," ",$2}'`