Scenario
A production Kubernetes cluster experiences multiple pods repeatedly crashing and entering CrashLoopBackOff, causing service degradation.
Symptoms
kubectl get podsshows many CrashLoopBackOff stateskubectl describe podreveals Last State as Error or OOMKilled- Nodes show NotReady or high memory/CPU pressure (
kubectl top nodes)
Diagnosis
- Check node health:
kubectl get nodes -o wideto see status,journalctl -u kubeletfor kubelet logs. - View events:
kubectl get events --sort-by=.metadata.creationTimestampto pinpoint timeline. - Analyze pod logs:
kubectl logs <pod> --previousfor last crash logs. - Check resource quotas:
kubectl describe quotato verify exceeded limits.
Commands
# List crashing pods across all namespaces
kubectl get pods --all-namespaces | grep -E 'CrashLoop|Error|OOM'
# Get detailed events for a specific pod
kubectl describe pod my-app-5d8c9b7f6-abcde -n production
# Check node resources
kubectl top nodes
# View pod resource usage on a node
kubectl describe node worker-node-1 | grep -A 5 'Non-terminated Pods'
Risk Controls
- Before modifying resources, cordon the node:
kubectl cordon <node>to prevent new pods from scheduling. - Safely drain the node:
kubectl drain <node> --ignore-daemonsets --delete-local-data - Confirm sufficient node capacity before increasing resource requests/limits.
Rollback
If caused by a recent configuration change:
- Roll back deployment: kubectl rollout undo deployment/my-app
- Roll back to a specific revision: kubectl rollout undo deployment/my-app --to-revision=2
- Verify rollback: kubectl rollout status deployment/my-app
Verification
- Check pod status:
kubectl get pods -o wideto confirm Running - Check service endpoints:
kubectl get endpoints <service>shows correct IPs - Application health check: Send HTTP request to verify correct response
- Monitor metrics: Check cluster monitoring (e.g., Prometheus) for recovered CPU/memory
When to Submit an OpsGlobal Ticket
- Nodes completely unreachable and cannot be drained
- Persistent volume failure causing data unavailability
- Control plane component issues (etcd, apiserver)
- Urgent patching needed but lacks internal expertise
- Complex network issues unresolved within 24 hours
Use cases
Useful for teams handling Kubernetes issues and needing a clear troubleshooting and delivery workflow.
Problem background
A practical guide for SREs to handle common Kubernetes incidents, from symptom detection to rollback and escalation.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.