How to fix network plugin is not ready: cni config uninitialized in Kubernetes

KubernetesINTERMEDIATECRITICALUpdated Dec 7, 2025· 361 views

This error occurs when the CNI (Container Network Interface) plugin is not installed or configured. Fix it by installing a CNI plugin like Calico, Flannel, or Cilium and ensuring system prerequisites like IP forwarding are enabled.

Quick fix

Fixes network plugin is not ready: cni config uninitialized

# Enable immediately
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
sudo modprobe br_netfilter

# Persist across reboots
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cni.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
sudo sysctl -p /etc/sysctl.d/99-kubernetes-cni.conf
  1. Enable system prerequisites on all nodes
  2. Initialize cluster with correct pod CIDR
  3. Install Flannel CNI plugin
  4. Install Calico CNI plugin
kubernetes — error
# Enable immediately
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
sudo modprobe br_netfilter
# Persist across reboots
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cni.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
sudo sysctl -p /etc/sysctl.d/99-kubernetes-cni.conf
network plugin is not ready: cni config uninitialized

What this error means

The "network plugin is not ready: cni config uninitialized" error indicates that Kubernetes cannot initialize pod networking because no CNI (Container Network Interface) plugin is installed or configured. This is a critical error that prevents nodes from becoming Ready and blocks all pod scheduling. After running kubeadm init, Kubernetes creates the control plane but doesn't include a network plugin—you must install one separately. The kubelet waits for CNI configuration files in /etc/cni/net.d/ and plugin binaries in /opt/cni/bin/. Without these, nodes remain NotReady. This error commonly occurs on fresh cluster installations before applying a network add-on, or when CNI plugin pods crash or get deleted.

Typical symptoms

  • kubectl get nodes shows nodes in NotReady status
  • kubectl describe node shows NetworkUnavailable=True condition
  • CoreDNS pods stuck in Pending state
  • Kubelet logs show repeated "cni config uninitialized" errors
  • No pods can be scheduled on affected nodes
  • Missing cni0 network interface on nodes

Common causes

  1. No CNI plugin installed after kubeadm init
  2. CNI plugin binaries missing from /opt/cni/bin/
  3. No CNI configuration in /etc/cni/net.d/
  4. CNI version mismatch between config and plugin
  5. Missing --pod-network-cidr flag during cluster initialization

How to fix "network plugin is not ready: cni config uninitialized"

1Enable system prerequisites on all nodes

Enable IP forwarding and bridge netfilter (required for CNI):

bash
# Enable immediately
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
sudo modprobe br_netfilter

# Persist across reboots
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cni.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
sudo sysctl -p /etc/sysctl.d/99-kubernetes-cni.conf

Install CNI binaries if missing:

bash
apt-get update && apt-get install -y kubernetes-cni
sudo systemctl restart kubelet
2Initialize cluster with correct pod CIDR

If starting fresh, specify pod network CIDR:

bash
# For Flannel (use 10.244.0.0/16)
sudo kubeadm init --pod-network-cidr=10.244.0.0/16

# For Calico (use 192.168.0.0/16)
sudo kubeadm init --pod-network-cidr=192.168.0.0/16

If cluster already initialized, proceed to install CNI plugin.

3Install Flannel CNI plugin

Apply Flannel manifest:

bash
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml

# Wait for flannel pods
kubectl wait --for=condition=ready pod -l app=flannel -n kube-flannel --timeout=300s

# Verify cni0 interface created
ip link show | grep cni0

# Check node status
kubectl get nodes
4Install Calico CNI plugin

For network policy support, use Calico:

bash
# Install Calico operator
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml

# Wait for CRD
kubectl wait --for=condition=Established crd/installations.operator.tigera.io --timeout=300s

# Install Calico
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml

# Verify pods running
kubectl get pods -n calico-system

# Check node status
kubectl get nodes
5Diagnose CNI configuration issues

Check existing CNI configuration:

bash
# List CNI configs
ls -la /etc/cni/net.d/

# Check config content
cat /etc/cni/net.d/*.conflist

# List CNI binaries
ls -la /opt/cni/bin/

# Check containerd can see CNI
grep -A5 "plugins" /etc/containerd/config.toml

If version mismatch, check cniVersion in config matches installed plugins.

Restart container runtime and kubelet:

bash
sudo systemctl restart containerd
sudo systemctl restart kubelet
6Monitor CNI initialization

Watch logs for CNI initialization:

bash
# View kubelet logs
journalctl -u kubelet -f | grep -i cni

# View containerd logs
journalctl -u containerd -f | grep -i cni

# Check node conditions
kubectl describe node <node-name>
# Look for: NetworkUnavailable condition

# View CNI plugin pod logs
kubectl logs -n kube-system -l k8s-app=flannel --tail=100

Once CNI initializes, nodes should transition to Ready.

Advanced notes

CNI Initialization Sequence:
1. kubeadm init starts kubelet and static pods
2. Kubelet waits for CNI config in /etc/cni/net.d/
3. Container runtime loads CNI binaries from /opt/cni/bin/
4. Network plugin creates cni0 bridge and configures pod IPs
5. Nodes transition to Ready state
6. CoreDNS and other system pods start scheduling

Container Runtime Compatibility:
- containerd v1.6.0-v1.6.3 has known CNI issues—upgrade to v1.6.4+
- CRI-O must be restarted after CNI plugin installation
- All require: /opt/cni/bin/ binaries + /etc/cni/net.d/ config files

Common Misconfigurations:
1. Pod CIDR overlaps with host network
2. Firewall blocking CNI ports (Flannel: 8285/UDP, Calico: 179/TCP)
3. Missing IAM permissions (AWS EKS: AmazonEKS_CNI_Policy)
4. Applying CNI manifest before kubelet is ready

Recovery Strategy:
1. Cordon affected nodes: kubectl cordon <node>
2. Fix CNI installation
3. Restart kubelet: systemctl restart kubelet
4. Verify Ready: kubectl get nodes
5. Uncordon: kubectl uncordon <node>

Frequently asked questions

What does "network plugin is not ready: cni config uninitialized" mean?
The "network plugin is not ready: cni config uninitialized" error indicates that Kubernetes cannot initialize pod networking because no CNI (Container Network Interface) plugin is installed or configured. This is a critical error that prevents nodes from becoming Ready and blocks all pod scheduling. After running kubeadm init, Kubernetes creates the control plane but doesn't include a network plugin—you must install one separately.
How do I fix "network plugin is not ready: cni config uninitialized"?
This error occurs when the CNI (Container Network Interface) plugin is not installed or configured. Fix it by installing a CNI plugin like Calico, Flannel, or Cilium and ensuring system prerequisites like IP forwarding are enabled.
What causes "network plugin is not ready: cni config uninitialized"?
No CNI plugin installed after kubeadm init CNI plugin binaries missing from /opt/cni/bin/ No CNI configuration in /etc/cni/net.d/
Is the "network plugin is not ready: cni config uninitialized" error serious?
Yes. This is a critical-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading