If you cycle the power on an API Connect cluster that is deployed on OpenShift or Cloud
Pak for Integration, you might need to reset the IP address for the
kubernetes.io/hostname
.
About this task
You will know there is a problem if you cycle the power for the cluster and receive an error, or
find that the deployment remains in the pending
state indefinitely because some of
the pods failed to start. Complete the following steps to resolve the problem:
Procedure
-
Run the following command to check the label on the worker nodes:
oc get nodes -l kubernetes.io/hostname=localhost
If the response
shows the following message, then the power cycle did not cause a problem and you can skip the rest
of this task:
No resources found
If the response looks like the following
example (the IP address will be different), proceed to the next
step:
NAME STATUS ROLES AGE VERSION
ip-233.252.0.0.us-west-1.compute.internal Ready worker 27h v1.19.0+8d12420
-
Run the following command to correct the problem:
for i in $(oc get nodes -l kubernetes.io/hostname=localhost|grep worker|awk '{print $1}'); do echo $i; oc label nodes $i kubernetes.io/hostname=`echo $i|awk -F'.' '{print $1}'` --overwrite=true; done