Skip to Content
Asterrr's Handbook
Cheat sheets

Troubleshooting flow

Symptoms to first commands to likely causes, plus the file paths and ports to know by heart for the CKA troubleshooting domain.

Symptom to first command

SymptomFirst commandsUsual causes
kubectl refused or times outOn the control plane: sudo crictl ps -a, sudo crictl logs <id>, ls /etc/kubernetes/manifestsAPI server manifest typo, wrong port, expired cert, etcd down
Node NotReadysystemctl status kubelet, journalctl -u kubelet -n 50, systemctl status containerdKubelet stopped, bad config.yaml, runtime down, CNI missing, expired cert
Pod Pendingk describe pod EventsInsufficient CPU or memory, untolerated taint, nodeSelector, unbound PVC, scheduler down
ContainerCreating for longk describe podMissing ConfigMap, Secret or PVC, CNI error
ImagePullBackOffk describe podWrong name or tag, private registry without imagePullSecrets
CrashLoopBackOffk logs --previous, k describe podBad command, config, dependency, OOM
OOMKilled, exit 137k describe podMemory limit too low
Running but READY 0/1k describe pod, probe settingsFailing readiness probe
Service unreachablek get ep,endpointslices, k get svc -o wideSelector mismatch, wrong targetPort, NetworkPolicy
Name does not resolvek run t --rm -it --image=busybox:1.36 -- nslookup svc, k logs -n kube-system -l k8s-app=kube-dnsCoreDNS down, policy blocks 53
kubectl top failsk get apiservice v1beta1.metrics.k8s.io, k get pods -n kube-systemmetrics-server missing or not Ready
Deployment makes no Podsk get rs, controller-manager logsController manager down
New Pods never scheduled, no eventsk get pods -n kube-system, scheduler manifestScheduler down or its manifest broken

Exit codes

CodeMeaning
0Success
1Application error
126, 127Command not executable, command not found
137SIGKILL: OOM kill or forced kill
143SIGTERM: normal termination

Paths

PathHolds
/etc/kubernetes/manifests/Static Pod manifests of the control plane and etcd
/etc/kubernetes/pki/, pki/etcd/CA and component certificates
/etc/kubernetes/{admin,kubelet,scheduler,controller-manager}.confComponent kubeconfigs
/var/lib/kubelet/config.yamlKubelet configuration
/var/lib/kubelet/pki/Kubelet client and serving certificates
/var/lib/etcdetcd data on a kubeadm node
/etc/cni/net.d/, /opt/cni/bin/CNI config and binaries
/var/log/pods/, /var/log/containers/Container logs on the node
/etc/containerd/config.tomlcontainerd configuration

Node-level tools

journalctl -u kubelet -f, systemctl restart kubelet, crictl ps -a, crictl logs <id>, crictl pods, crictl inspect <id>, openssl x509 -noout -dates -in <crt>, kubeadm certs check-expiration.

Rules of thumb

  • Read the Events (describe) before the logs, and the previous logs before the current ones.
  • A Pod you cannot explain: check labels, selectors, taints, quotas and PVCs, in that order.
  • Fix the manifest, not the Pod. Static Pods recreate themselves from their file.
  • Verify the way a grader would. Test traffic from a temporary Pod in the right namespace.

On this page