Secret watcher pod shows CrashLoopBackOff status
The secret-watcher pod keeps crashing and shows a CrashLoopBackOff status.
Cause
There might be many Kubernetes secrets that are configured in the cluster. The current memory limit that is configured in the secret-watcher pod is not sufficient to manage the Kubernetes secrets. Kubernetes killed the pod due to less
memory.
Resolving the problem
To resolve the issue, increase the resource memory limit to a value that is sufficient for the pod to manage all the Kubernetes secrets.
-
Log in to your cluster node.
-
Check the number of Kubernetes secrets that are in the cluster.
kubectl get secrets --all-namespaces | wc -l -
Edit the
secret-watcherdeployment.kubectl -n kube-system edit deployment secret-watcher -
Locate the
resourcessection. Add the required memory limit in theresources.limits.memorysection.resources: limits: cpu: 200m memory: 128Mi requests: cpu: 10m memory: 10Mi -
Save and exit the deployment.
-
Check the
secret-watcherpod status. The status must show as1/1 Running.kubectl -n kube-system get pods | grep secret-watcher