Cheat Sheet
A practical, exam-focused reference for commands, YAML patterns, troubleshooting, and the
small details that can cost you time.
How to use this guide
Use it as a quick-reference document rather than a theory guide. The goal is to help you recognize the task, reach for the right
command or YAML pattern, and verify the result before moving on.
1 2 3
Set the context Scaffold instead of typing from Verify before you move on
scratch
CKA Last-Minute Cheat Sheet Page 1
, CKA Ultimate Last-Minute Cheat Sheet
The stuff you actually need at 11pm the night before the exam
A quick note before you dive in: this isn't a "concepts" refresher. You already know what a Pod is. This is meant for quick recall:
commands, YAML patterns, and the small gotchas that can quietly cost you time. Read it once before the exam, then keep it
nearby for fast lookups.
0. Exam Survival Basics (read this first)
• **Set your context per task.** Every question tells you which cluster/context to use. First command, every single time:
kubectl config use-context <context-name>
Easy point to lose: switching to the wrong context can make an otherwise correct command affect the wrong cluster.
• **Set an alias and autocomplete immediately** (first 30 seconds of the exam):
alias k=kubectl
source <(kubectl completion bash)
complete -F __start_kubectl k
export do="--dry-run=client -o yaml"
$do saves you enormous amounts of typing — You will use it repeatedly while building resources. to scaffold YAML instead of
hand-writing it.
• **Vim setup** (if you're not using it, set it in `~/.vimrc` before you start):
set expandtab
set tabstop=2
set shiftwidth=2
YAML is whitespace-sensitive. Tab characters will silently break things and cost you time you don't have.
• **Always use `-o yaml --dry-run=client` to generate a base**, then edit rather than freehand. Freehand YAML under time pressure
is where mistakes live.
• **Bookmark kubernetes.io/docs in your browser** before the exam starts. You get one tab to the official docs (and your own
notes if allowed by your provider). Know the URL structure so you can jump straight to "Configure Liveness Probes" instead of
searching.
1. Cluster Architecture, Installation & Configuration
kubeadm cluster bootstrap (control plane)
# On the control plane node
kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=<CP_IP>
# Standard post-init steps (kubeadm prints these, don't skip them)
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
# Install a CNI (Flannel example — pick whatever the task specifies)
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
Get the join command again if you lost it:
kubeadm token create --print-join-command
Join a worker node:
kubeadm join <CP_IP>:6443 --token <token> --discovery-token-ca-cert-hash sha256:<hash>
kubeadm cluster upgrade (this WILL be on the exam)
Order matters: control plane first, then workers, one node at a time.
CKA Last-Minute Cheat Sheet Page 2