Kubernetes Master Node in NotReady State With Message "cni plugin not initialized"

Problem

  • A Kubernetes master node is showing as NotReady and the describe output for the node is showing "cni not initialized".
Node Status
Copy
  • A description of the node similarly reports KubeletNotReady due to the CNI plugin being uninitialized.
Node Description
Copy

Environment

  • Platform9 Managed Kubernetes - v5.4 and Higher
  • Kubernetes - All v1.21
  • Runtime - Containerd
  • Container Network Interface - Calico

Cause

Due to an bug in the Platform9 Managed Kubernetes Stack the CNI config is not reloaded when a partial restart of the stack takes place.

Resolution

This issue is now fixed on the pf9-kube- 1.23.8-pmk.218 and above releases.

Workaround

  1. Verify that the CNI configuration directory referenced by containerd is not empty on the affected node.

For Calico based clusters the directory should contain the following files:

Bash
Copy
  1. If the files mentioned above are missing, restart calico-node pod on the affected node.
Bash
Copy

The Kubernetes nodes should now all show as Ready .

  1. Verify the status of the node after restarting calico-node pod.
Node Status
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard