Summary Cheat Sheet
| Concept | Key Takeaway |
| kubectl | Client that talks to API server via REST |
| kubeconfig | Config file with clusters/users/contexts |
| Context | cluster + user + namespace |
| Imperative | kubectl run, create, set, scale |
| Declarative | kubectl apply |
| Apply 3-way merge | last-applied + new + live |
| Server-side apply | Better than client-side, used by GitOps |
| -o jsonpath | Extract specific fields |
| -o custom-columns | Custom table output |
| -o yaml | Full resource |
| kubectl describe | Human-readable + Events |
| Events | Cluster notifications, last ~1 hour |
| kubectl debug | Ephemeral containers for distroless |
| kubectl patch | Modify specific fields |
| kubectl diff | Preview changes |
| CrashLoopBackOff | App crashing → check logs --previous |
| ImagePullBackOff | Image problem → check Events |
| Pending | Scheduling problem → check describe Events |
| OOMKilled | Memory limit → increase or fix leak |
| No endpoints | Selector mismatch |
1:1 copy of the class Google Doc, code in code blocks.