Chapter 2: kubectl — Your Swiss Army Knife
⏱️ Total chapter time: ~45 min (20 min reading + 25 min lab)
After this chapter, you will be able to: Query, inspect, create, and delete any Kubernetes resource from the command line — and do it efficiently with output formatting and filtering.
What’s Inside
| Section | Topic | Time |
|---|---|---|
| 2.1 | Anatomy of a kubectl Command | ~5 min |
| 2.2 | Imperative vs Declarative — Two Ways to Talk to K8s | ~5 min |
| 2.3 | Context, Namespaces, and kubeconfig | ~5 min |
| 2.4 | Output Formatting, Filtering, and JSONPath | ~6 min |
| 2.5 | 🔬 Lab: kubectl Power User Drills | ~25 min |
Prerequisites
- Completed Chapter 1 (Minikube cluster running)
minikube statusshowsRunning