Incident Basics
This page is a hands-on intro to running the first minutes of a Kubernetes incident: how to scope the blast radius, read pod states, capture evidence, and mitigate fast without breaking more.
Search across all documentation pages
This page is a hands-on intro to running the first minutes of a Kubernetes incident: how to scope the blast radius, read pod states, capture evidence, and mitigate fast without breaking more.
kubectl matching your cluster minor (client skew is supported within one minor of the API server).crictl on nodes for container-runtime triage (containerd via CRI runs the pods).# Confirm your context and versions before you touch a live cluster
kubectl config current-context
kubectl versionDecide in seconds whether this is one workload or the whole cluster.
kubectl get pods -A --field-selector=status.phase!=Running
kubectl get nodesNotReady node explains every pod scheduled onto it.The STATUS column tells you which runbook to open.
kubectl get pods -n prod -o wideCrashLoopBackOff: the container starts then exits - go to logs and exit codes.OOMKilled: the kernel killed it for memory - go to limits and usage.ImagePullBackOff / ErrImagePull: registry or pull-secret problem.Pending: it cannot be scheduled - go to capacity, requests, taints.describe surfaces the recent events that explain the state.
kubectl describe pod <pod> -n prodEvents: section at the bottom first.Last State: Terminated shows the exit code and reason.Back-off restarting failed container confirms a crash loop.FailedScheduling names the exact scheduling constraint that failed.A crashed container's logs live in the previous instance, not the current one.
kubectl logs <pod> -n prod --previous
kubectl logs <pod> -n prod -c <container> --tail=100--previous retrieves logs from the last terminated container.-c for multi-container pods.Most incidents follow a change - a deploy, config edit, or scaling event.
kubectl rollout history deployment/api -n prod
kubectl get events -n prod --sort-by=.lastTimestamp | tail -30Scaled, Killing, Unhealthy, and BackOff reasons.If a bad deploy caused it, reverting is usually the fastest fix.
kubectl rollout undo deployment/api -n prod
kubectl rollout status deployment/api -n produndo returns to the previous ReplicaSet revision.rollout status blocks until the healthy revision is available.--to-revision=<n> to target a specific known-good revision.Deleting a pod for a fresh start also deletes its logs and state.
kubectl describe pod <pod> -n prod > /tmp/incident-pod.txt
kubectl logs <pod> -n prod --previous > /tmp/incident-logs.txtdescribe and --previous logs before any restart.When the image has no shell, kubectl debug gives you tools without rebuilding.
kubectl debug -it <pod> -n prod --image=busybox:1.36 --target=app -- shdebug injects an ephemeral container sharing the pod's namespaces.--target=app shares the process namespace of the app container.Stop new pods landing on a suspect node, then move existing ones off.
kubectl cordon node-7
kubectl drain node-7 --ignore-daemonsets --delete-emptydir-datacordon marks the node unschedulable but leaves running pods.drain evicts pods so replacements schedule elsewhere.--ignore-daemonsets is required because DaemonSet pods do not drain.kubectl uncordon node-7 once healthy.When kubectl cannot see a container, drop to the CRI layer.
$ sudo crictl ps -a
$ sudo crictl logs <container-id>
$ sudo journalctl -u containerd -n 100 --no-pagercrictl talks directly to containerd via the CRI socket.journalctl -u containerd and -u kubelet show node-agent errors.docker ps on nodes.Stack versions: This page was written for Kubernetes 1.36.2, Docker Engine 29.6.1 (BuildKit default), containerd (CRI runtime on nodes), Helm 3, Compose v2, Argo CD (latest - verify at build), and Gateway API (GA - verify controller support at build).
Reviewed by Chris St. John·Last updated Jul 16, 2026