Hands-on Lab·Certified Kubernetes Administrator
kubectl Productivity for the Exam
Two hours, seventeen tasks. --dry-run=client -o yaml writes the manifest you were about to type from memory, kubectl explain replaces the browser tab, and jsonpath answers a question instead of printing a table to read.
Foundations Guide 6 of 103 Beginner
- Kubernetes1.36.4
- Cluster1 node
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 18 min
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA4001 | 192.168.0.191 | Ubuntu 26.04 LTS | Single Node (control plane, untainted) | 2 Core | 4 GB | 50 GB |
This guide includes
Use this while preparing for a timed exam, where seventeen tasks share two hours. This matters because most of the time lost goes on writing YAML from memory and reading full tables, and both have a much faster replacement.
- building objects with
--dry-run=client -o yamlinstead of typing YAML from memory - using
kubectl explainagainst your own cluster rather than a browser tab - asking for one field with
jsonpathorcustom-columnsinstead of reading a table - setting the namespace on your context so
-nstops being typed on every command
Before you start
- A working kubeconfig. guide 5 covers the two styles these flags sit between.
-
Never write YAML from memory
-
explain instead of a browser tab
-
Ask for one field, not a table
-
Stop typing -n every time