Interview Prep/Kubernetes/Upgrades, etcd, disaster recovery and incidents

How do you list everything running in a namespace and see what is unhealthy?

BeginnerScenarioUpgrades, etcd, disaster recovery and incidents
Answer

Situation read → You are handed an unfamiliar namespace during an incident.

What I'd do →

  1. kubectl get all -n app for the main workload objects
  2. kubectl get pods -n app -o wide to see nodes and restarts
  3. kubectl get events -n app --sort-by=.lastTimestamp
  4. kubectl top pods -n app for resource usage
  5. kubectl describe on anything not Running or Ready

Why → A few commands give you state, placement, events and usage within a minute.

Interview tip → Note that get all does not include ConfigMaps, Secrets, Ingress or PVCs.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Upgrades, etcd, disaster recovery and incidents