Scenario
A critical deployment experiences resource contention during high traffic, causing increased latency and partial request timeouts.
Symptoms
- Pod restart count spikes (kubectl get pods shows CrashLoopBackOff).
- Application returns 503 errors.
- Node CPU/memory usage exceeds 80%.
- User reports slow response times.
Diagnosis
- Check node resources:
kubectl top nodesshows utilization. - Inspect Pod status:
kubectl get pods -o wideidentifies abnormal Pod distribution. - Deep dive into Pod:
kubectl describe pod <pod-name>for events and resource limits. - Log analysis:
kubectl logs <pod-name> --tail=100to find errors. - Cluster events:
kubectl get events --sort-by='.lastTimestamp'to pinpoint triggers.
Commands Example
# View node resources
kubectl top nodes
# List non-running Pods across namespaces
kubectl get pods --all-namespaces | grep -v Running
# Describe deployment
kubectl describe deployment <deployment-name>
# Tail logs for a label
kubectl logs --tail=50 -l app=<app-label>
Risk Controls
- Set ResourceQuotas to prevent single team from exhausting cluster resources.
- Use PriorityClass to ensure critical services are scheduled first.
- Configure PodDisruptionBudget to avoid full outage during rolling updates.
- Enable HorizontalPodAutoscaler for critical deployments.
Rollback Procedure
# Roll back to previous revision
kubectl rollout undo deployment/<deployment-name>
# Roll back to specific revision
kubectl rollout undo deployment/<deployment-name> --to-revision=3
# Verify rollback status
kubectl rollout status deployment/<deployment-name>
Verification
- Monitor metrics: request latency (P99), error rate, pod restart count.
- Canary deployment: deploy new version to a small subset and observe.
- Load testing: simulate traffic using hey or wrk to ensure performance.
When to Submit an OpsGlobal Ticket
- Root cause unclear and issue persists beyond 30 minutes.
- Need cluster-level audit, e.g., etcd slow queries, control plane anomalies.
- Internal team lacks post-incident review experience.
- Need expert assistance in resource optimization or architecture.
OpsGlobal's SRE team provides 24/7 support to help you recover quickly and prevent recurrence.
Use cases
Useful for teams handling Kubernetes issues and needing a clear troubleshooting and delivery workflow.
Problem background
This guide walks through a real-world Kubernetes incident scenario, from symptom detection to rollback, with actionable commands and risk controls. Learn when to escalate to OpsGlobal for expert support.
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.