Rate This Document
Findability
Accuracy
Completeness
Readability

kube-flannel CrashLoopBackOff and OOMkilled Exception

Symptom

When the kubectl get pod -n kube-system command is run, it is shown that the network plugin kube-flannel keeps trying to restart. Sometimes, the restart is normal; sometimes, the CrashLoopBackOff exception occurs; sometimes, the OOMKilled exception occurs.

Key Process and Cause Analysis

The memory configured in the kube-flannel.yml file is too small.

Conclusion and Solution

  1. Increase the memory size in the kube-flannel.yml file.

    For example, change the memory size from 50 MB to 200 MB.

  2. Apply the file again.
    kubectl apply -f kube-flannel.yml