Pod replicas don't match the desired count due to pending pods, crashed containers, or scheduling failures. Fix by checking node capacity, debugging pending pods, and fixing application issues.
Fixes REPLICA_MISMATCH
kubectl get pods -n <namespace> -o wide
kubectl describe pod -n <namespace> <pending-pod>kubectl get pods -n <namespace> -o widekubectl describe pod -n <namespace> <pending-pod>Deployment replicas mismatch, desired != actual
On this page
A replica mismatch means the deployment controller can't create enough pods to meet your desired replica count. The scheduler has pods in Pending or Failed state that it can't place on nodes.
kubectl get pods -n <namespace> -o wide
kubectl describe pod -n <namespace> <pending-pod>kubectl top nodes
kubectl describe nodeskubectl scale deployment <name> --replicas=1 -n <namespace>Add nodes via cloud provider or cluster autoscaler.
kubectl scale deployment <name> --replicas=3 -n <namespace>Use Horizontal Pod Autoscaler (HPA) to automatically scale based on metrics.