You may encounter a situation in DKP 2.X in which the kommander-cm pod is crash looping, and the reason given in the "kubectl describe pod" output shows that it is due to exit code 137, or oom-kill.
This is usually a result of a management cluster that is dealing with more traffic than the default resource limits were configured to address.
To increase the amount of memory for this pod, you can configure a ConfigMap override for the Kommander appdeployment.
First, we're going to create a ConfigMap containing a higher memory limit than the default of 512Mi. Save the following as a file called kommander-cm-override.yaml:
Next, apply the ConfigMap to your cluster:
kubectl apply -f kommander-cm-override.yaml
Now we are going to edit the kommander appdeployment to use this ConfigMap:
kubectl edit appdeployment -n kommander kommander
Edit the "spec:" section to add a configOverride value. Do not touch the appRef section:
Save your changes, and within a few minutes the kommander-cm pod should restart with a new memory limit.
In some cases, such as when the pod has crashed enough for the Kubelet to give up on restarting it, you may need to delete the "kommander" helmrelease in order to force the changes to apply.