How to fix agent not ready in Kubernetes
Cilium agent not ready errors occur during initialization or when dependencies fail. Fix by checking pod logs, verifying kernel compatibility, and ensuring sufficient system resources.
Quick fix
Fixes agent not ready
kubectl logs -n kube-system -l app=cilium --tail=100
kubectl logs -n kube-system -l app=cilium --previous- Check Cilium pod logs for errors
- Verify kernel version meets minimum requirements
- Check node taint status
- Verify eBPF support on node
kubectl logs -n kube-system -l app=cilium --tail=100kubectl logs -n kube-system -l app=cilium --previousagent not ready
What this error means
The Cilium agent daemon is responsible for eBPF policy enforcement and pod networking on each node. When the agent is not ready, the node cannot schedule pods or enforce network policies. The agent must complete initialization including eBPF program loading and kernel module setup before becoming ready.
Typical symptoms
- Cilium pod shows CrashLoopBackOff or not ready status
- Node has taint node.cilium.io/agent-not-ready
- Error message "cni plugin not initialized"
- Pod creation fails with "unable to allocate IP via local cilium agent"
- Agent reports "unable to connect to cilium" in pod events
- Pods stuck in Pending state unable to get network
- Agent keeps restarting with crash errors
- Node becomes SchedulingDisabled due to agent failure
Common causes
- eBPF programs failing to load due to kernel incompatibility
- Required Linux kernel modules not available
- Insufficient memory or CPU causing initialization timeout
- Taint not removed after agent starts (stuck in not-ready)
- IP address allocation failure (IP pool exhausted)
- CNI plugin chain configuration issue with other plugins
- Kernel version below Cilium minimum requirements
- SELinux or AppArmor blocking eBPF operations
How to fix "agent not ready"
View detailed initialization logs:
kubectl logs -n kube-system -l app=cilium --tail=100
kubectl logs -n kube-system -l app=cilium --previousLook for eBPF loading errors, memory allocation failures, or kernel incompatibility messages.
Check kernel compatibility with Cilium version:
uname -r
kubectl describe node <node-name> | grep -i kernelMinimum kernel depends on Cilium version (typically 4.9+).
Verify if agent-not-ready taint is present:
kubectl describe node <node-name> | grep Taints
kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taintsTaint should be removed once agent becomes ready.
Ensure kernel eBPF features are available:
grep BPF /boot/config-$(uname -r)
ls -la /sys/kernel/debug/tracing/
grep -E "(bpf|tracepoint)" /proc/sys/kernel/perf_event_paranoidIf agent fails due to IP allocation, check IP pool:
kubectl exec -it -n kube-system ds/cilium -- cilium-dbg status | grep -i ipam
kubectl exec -it -n kube-system ds/cilium -- cilium-dbg ipamEnsure sufficient CPU and memory:
kubectl top nodes
kubectl describe node <node-name> | grep -A 5 "Allocatable"Cilium requires at least 512MB RAM per node.
Review CNI config for conflicts with other plugins:
cat /etc/cni/net.d/*
kubectl get daemonset -n kube-system | grep -i cniEnsure only one CNI plugin is configured.
Force full restart of Cilium:
kubectl rollout restart daemonset/cilium -n kube-system
kubectl rollout status daemonset/cilium -n kube-system --timeout=5mMonitor logs during restart for initialization progress.
Advanced notes
For production, ensure all nodes meet kernel and resource requirements before deploying Cilium. Pre-load eBPF programs for faster agent startup. Monitor Cilium agent health via metrics endpoint. Use BPF ring buffer for events instead of perf ring in high-throughput environments. For multi-node clusters, implement node affinity for critical workloads while Cilium stabilizes on some nodes.
Frequently asked questions
- What does "agent not ready" mean?
- The Cilium agent daemon is responsible for eBPF policy enforcement and pod networking on each node. When the agent is not ready, the node cannot schedule pods or enforce network policies. The agent must complete initialization including eBPF program loading and kernel module setup before becoming ready.
- How do I fix "agent not ready"?
- Cilium agent not ready errors occur during initialization or when dependencies fail. Fix by checking pod logs, verifying kernel compatibility, and ensuring sufficient system resources.
- What causes "agent not ready"?
- eBPF programs failing to load due to kernel incompatibility Required Linux kernel modules not available Insufficient memory or CPU causing initialization timeout
- Is the "agent not ready" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.
Official resources & further reading
- ๐Kubernetes Official Documentation
- ๐Cilium Troubleshooting(Official Docs)
- ๐Cilium Node Taints(Official Docs)
- ๐CNI Plugin Not Initialized(GitHub)