Troubleshooting installation on Kubernetes

Review the following known issues and troubleshooting tips if you encounter a problem while you are installing API Connect on Kubernetes.

DataPower operator fails to start

Symptom

The DataPower operator pods fail to start or schedule in a Kubernetes environment. You can view the following error: no nodes match pod topology spread constraints (missing required label).

For example,
0/15 nodes are available: 12 node(s) didn't match pod topology spread constraints (missing required label), 
3 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
Cause

Incorrect or outdated topology spread constraints in the ibm-datapower.yaml deployment file cause this issue.

  • The topologyKey might be set to a generic or incorrect value, such as zone.

  • The whenUnsatisfiable field might be set to DoNotSchedule, which prevents pods from being scheduled if constraints are not met.

  • Kubernetes nodes lack the required labels or have taints that the pod does not tolerate.

Resolution
You can workaround the issue by editing the DataPower operator deployment and reapplying it, as shown in the following steps:
  1. Delete the DataPower operator deployment, if deployed already:

    kubectl delete -f ibm-datapower.yaml -n <namespace>
  2. Open ibm-datapower.yaml, and locate the topologySpreadConstraints: section. For example:
    topologySpreadConstraints:
    - maxSkew: 1
      topologyKey: zone
      whenUnsatisfiable: DoNotSchedule
  3. Replace the values for topologyKey: and whenUnsatisfiable: with the corrected values that are shown in the following example:
    topologySpreadConstraints:
    - maxSkew: 1
      topologyKey: topology.kubernetes.io/zone
      whenUnsatisfiable: ScheduleAnyway
  4. Save ibm-datapower.yaml and deploy the file to the cluster:
    kubectl apply -f ibm-datapower.yaml -n <namespace>