Systematic Kubernetes troubleshooting and incident response. Use this skill whenever the user mentions Kubernetes, K8s, kubectl, pods, containers, or clusters. Triggers include diagnosing CrashLoopBackOff, ImagePullBackOff, OOMKilled, or Pending pods, responding to production incidents, troubleshooting node NotReady or DiskPressure, debugging service connectivity or networking, investigating PVC or storage failures, analyzing performance degradation, checking cluster health, troubleshooting Helm releases, and conducting post-incident reviews.
72
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Systematic approach to diagnosing and resolving Kubernetes issues in production environments.
Follow this systematic approach for any Kubernetes issue:
Run cluster health check:
# Check node status and health
kubectl get nodes
# Find non-running pods across all namespaces
kubectl get pods -A --field-selector status.phase!=Running
# Check node resource usage
kubectl top nodesThis provides an overview of:
Based on triage results, focus investigation:
For Namespace-Level Issues:
python3 scripts/check_namespace.py <namespace>This provides comprehensive namespace health:
For Pod Issues:
# Get full pod details (status, events, conditions, resource config)
kubectl describe pod <pod-name> -n <namespace>
# Check current and previous container logs
kubectl logs <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous
# Get events specific to the pod
kubectl get events -n <namespace> --field-selector involvedObject.name=<pod-name>This reveals:
For additional investigations:
kubectl get events -n <namespace> --sort-by='.lastTimestamp'Consult references/common_issues.md for detailed information on:
Each issue includes:
Follow remediation steps from common_issues.md based on root cause identified.
Always:
After applying fix:
For production incidents, follow structured response in references/incident_response.md:
Severity Assessment:
Incident Phases:
Common Incident Scenarios:
See references/incident_response.md for detailed playbooks.
kubectl cluster-info
kubectl get nodes
kubectl get pods --all-namespaces | grep -v Running
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -20kubectl describe pod <pod> -n <namespace>
kubectl logs <pod> -n <namespace>
kubectl logs <pod> -n <namespace> --previous
kubectl exec -it <pod> -n <namespace> -- /bin/sh
kubectl get pod <pod> -n <namespace> -o yamlkubectl describe node <node>
kubectl top nodes
kubectl top pods --all-namespaces
ssh <node> "systemctl status kubelet"
ssh <node> "journalctl -u kubelet -n 100"kubectl describe svc <service> -n <namespace>
kubectl get endpoints <service> -n <namespace>
kubectl get networkpolicies --all-namespaceskubectl get pvc,pv --all-namespaces
kubectl describe pvc <pvc> -n <namespace>
kubectl get storageclasskubectl describe resourcequota -n <namespace>
kubectl describe limitrange -n <namespace>
kubectl get rolebindings,clusterrolebindings -n <namespace>Namespace-level health check and diagnostics:
Usage:
# Human-readable output
python3 scripts/check_namespace.py <namespace>
# JSON output for automation
python3 scripts/check_namespace.py <namespace> --json
# Include more events
python3 scripts/check_namespace.py <namespace> --events 20Best used when troubleshooting issues in a specific namespace or assessing overall namespace health.
For cluster-wide health checks, use kubectl directly:
# Node health and status
kubectl get nodes
kubectl top nodes
# Find non-running pods across all namespaces
kubectl get pods -A --field-selector status.phase!=Running
# System pod health
kubectl get pods -n kube-systemFor detailed pod investigation, use kubectl directly:
# Full pod details (status, events, conditions, resource config)
kubectl describe pod <pod-name> -n <namespace>
# Current and previous container logs
kubectl logs <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous
# Events specific to the pod
kubectl get events -n <namespace> --field-selector involvedObject.name=<pod-name>Comprehensive guide to common Kubernetes issues with:
Covers:
Read this when you identify a specific issue type but need detailed remediation steps.
Structured incident response framework including:
Read this when responding to production incidents or planning incident response procedures.
Comprehensive performance diagnosis and optimization guide covering:
Read this when:
Complete guide to Helm troubleshooting including:
Read this when:
1489c33
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.