# Troubleshooting Cheat Sheet

A fast first-command lookup. For the full diagnosis, causes, and fix per symptom, see [Troubleshooting](<https://computecentral.in/kubernetes/troubleshooting/index.md>).

## Pods

| Symptom | First command | Likely fix |
| --- | --- | --- |
| `Pending` | `kubectl describe pod <name>` | Lower requests, add capacity, fix taint/toleration or nodeSelector — [details](<https://computecentral.in/kubernetes/troubleshooting/pod-pending/index.md>) |
| `ImagePullBackOff` / `ErrImagePull` | `kubectl describe pod <name>` | Fix image tag, add `imagePullSecrets` — [details](<https://computecentral.in/kubernetes/troubleshooting/imagepullbackoff/index.md>) |
| `CrashLoopBackOff` | `kubectl logs <name> --previous` | Fix app config, tune/add `startupProbe` — [details](<https://computecentral.in/kubernetes/troubleshooting/crashloopbackoff/index.md>) |
| `OOMKilled` | `kubectl top pod <name>` | Raise `resources.limits.memory` or fix the leak — [details](<https://computecentral.in/kubernetes/troubleshooting/oomkilled/index.md>) |
| `Init:CrashLoopBackOff` | `kubectl logs <name> -c <init-container>` | Fix the init container's command/dependency wait — [details](<https://computecentral.in/kubernetes/troubleshooting/init-container-failures/index.md>) |

## Networking

| Symptom | First command | Likely fix |
| --- | --- | --- |
| Service unreachable | `kubectl get endpointslices -l kubernetes.io/service-name=<svc>` | Fix selector/label mismatch or readiness probe — [details](<https://computecentral.in/kubernetes/troubleshooting/02-networking-and-service-problems/index.md#service-has-no-endpoints>) |
| DNS lookup fails in pod | `kubectl get pods -n kube-system -l k8s-app=kube-dns` | Restart CoreDNS, use FQDN across namespaces — [details](<https://computecentral.in/kubernetes/troubleshooting/02-networking-and-service-problems/index.md#dns-resolution-failures-inside-pods>) |
| Ingress `404` | `kubectl describe ingress <name>` | Set `ingressClassName`, fix host/path rule — [details](<https://computecentral.in/kubernetes/troubleshooting/02-networking-and-service-problems/index.md#ingress-returning-404-502-or-503>) |
| Ingress `502`/`503` | `kubectl get endpointslices -l kubernetes.io/service-name=<backend-svc>` | Confirm backend has ready endpoints — [details](<https://computecentral.in/kubernetes/troubleshooting/02-networking-and-service-problems/index.md#ingress-returning-404-502-or-503>) |
| Connection times out, no error | `kubectl get networkpolicy -n <ns>` | Add matching `allow` rule — [details](<https://computecentral.in/kubernetes/troubleshooting/02-networking-and-service-problems/index.md#traffic-silently-dropped-by-a-networkpolicy>) |

## Storage

| Symptom | First command | Likely fix |
| --- | --- | --- |
| PVC `Pending` | `kubectl describe pvc <name>` | Set/fix `storageClassName`, check provisioner — [details](<https://computecentral.in/kubernetes/troubleshooting/03-storage-problems/index.md#pvc-stuck-in-pending>) |
| `FailedMount` | `kubectl describe pod <name>` | Delete stale pod holding a `ReadWriteOnce` volume — [details](<https://computecentral.in/kubernetes/troubleshooting/03-storage-problems/index.md#volume-mount-failures>) |
| `EACCES` inside container | `kubectl exec <name> -- id` | Set `fsGroup`/`runAsUser` to match volume ownership — [details](<https://computecentral.in/kubernetes/troubleshooting/03-storage-problems/index.md#permission-denied-inside-the-container>) |

## Cluster and Nodes

| Symptom | First command | Likely fix |
| --- | --- | --- |
| Node `NotReady` | `kubectl describe node <name>` | Restart kubelet, check CNI pod on that node — [details](<https://computecentral.in/kubernetes/troubleshooting/04-cluster-and-node-problems/index.md#node-notready>) |
| Pods `Evicted` | `kubectl get events -A --field-selector reason=Evicted` | Reclaim disk, set resource requests cluster-wide — [details](<https://computecentral.in/kubernetes/troubleshooting/04-cluster-and-node-problems/index.md#diskpressure-and-memorypressure-evictions>) |
| `kubectl` slow/timing out cluster-wide | `kubectl get --raw /healthz` | Check etcd/apiserver health — [details](<https://computecentral.in/kubernetes/troubleshooting/04-cluster-and-node-problems/index.md#control-plane-component-failures>) |
| Pod stuck `Terminating` | `kubectl get pod <name> -o jsonpath='{.metadata.finalizers}'` | Check node state and finalizers before `--force` — [details](<https://computecentral.in/kubernetes/troubleshooting/04-cluster-and-node-problems/index.md#pods-stuck-in-terminating>) |
| Node drain hangs | `kubectl get pdb -A` | A PodDisruptionBudget allows 0 disruptions — [details](<https://computecentral.in/kubernetes/workloads-and-scheduling/01-deployment-strategies/index.md#poddisruptionbudgets-availability-during-maintenance>) |

## Rollouts

| Symptom | First command | Likely fix |
| --- | --- | --- |
| Rollout hanging | `kubectl rollout status deployment/<name>` | Check new pod's readiness probe, or `kubectl rollout undo` |
| Need to revert | `kubectl rollout history deployment/<name>` | `kubectl rollout undo deployment/<name> --to-revision=<n>` |

## Related

[Full Troubleshooting Guide](<https://computecentral.in/kubernetes/troubleshooting/index.md>) · [kubectl Cheat Sheet](<https://computecentral.in/kubernetes/quick-reference/01-kubectl-cheat-sheet/index.md>)
