Back to lesson: kubectl Speed: Alias, Vim and Dry-Run
Free lab · CKA Prep Program · Module 1: Exam strategy and speed
kubectl speed kit
25 min hands-on · Core
Browser Kubernetes (Killercoda 1-node) or Play-with-Kubernetes; no local installs.
Two ways to do this lab: in your browser on Killercoda (free, no install), or on Play-with-Kubernetes as a free practice field. The Killercoda button opens in a new tab; this study page stays here. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.
Objectives
- Open a free browser cluster and confirm node status
- Create, expose and delete a workload using only imperative commands
- Save an alias plus dry-run template that survives the session
Step 1
Open the cluster
Start the scenario (or a PWK session), run `kubectl get nodes` and `kubectl cluster-info`. Record the Kubernetes version; exam content tracks quarterly releases, so always note the version first.
Step 2
Imperative sprint
Create a deployment with `kubectl create deployment`, expose it with `kubectl expose`, scale it with `kubectl scale`, then delete everything with `kubectl delete`. No YAML files allowed in this round; speed comes from flags.
Step 3
Templates that save minutes
Write `alias k=kubectl`, enable completion for your shell, and practice `-o yaml --dry-run=client` plus `kubectl explain` for one field you always forget. Save the exact lines into a session note.
How to confirm it worked
- `kubectl get nodes` shows a Ready node
- Deployment created, exposed, scaled and deleted without a YAML file
- Alias, completion and one dry-run template recorded verbatim