My CKA Cheat Sheet: Commands, Aliases, and Documentation Tricks I Used During the Exam

Search for a command to run...

No comments yet. Be the first to comment.
Follow my journey from DevOps Engineer to Kubestronaut as I explore Kubernetes, CNCF certifications, cloud-native technologies, and hands-on learning. In this series, I share my experiences preparing for and passing certifications such as CKA, CKAD, and CKS, along with exam strategies, study resources, troubleshooting lessons, and practical insights gained from real-world Kubernetes environments. Whether you're just starting with Kubernetes or pursuing advanced CNCF certifications, I hope these experiences help guide your own cloud-native journey.
One of the most common questions I receive from aspiring Certified Kubernetes Administrator (CKA) candidates is: “What should I actually practice before the exam?” After completing the CKA and spendin
Kubernetes Control Plane explained in a practical way for engineers who manage real-world clusters. Introduction When I first started learning Kubernetes, I could create Pods, Deployments, and Service

Kubernetes networking is one of the most important — and often most confusing — topics for beginners. Pods have IP addresses, Services have virtual IPs, DNS magically resolves names, Ingress routes tr

One of the most common questions developers ask when they start working with Kubernetes is: “What actually happens when a user sends a request to my application?” We deploy Pods, create Services, co

Most developers know that Kubernetes can automatically restart failed applications. But have you ever wondered what actually happens behind the scenes when a Pod crashes? When I first started learning

When developers first start learning Kubernetes, they quickly understand Pods and Deployments. You create a Deployment, Kubernetes creates Pods, and your application starts running. Simple, right? Not

Shahzad Ahmad | Kubernetes, DevOps & Cloud Native Journey
32 posts
Senior DevOps Engineer documenting my journey through Kubernetes, CNCF certifications, cloud-native technologies, platform engineering, and automation. Here you'll find hands-on tutorials, certification experiences (CKA, CKAD, CKS), exam strategies, troubleshooting guides, and lessons learned from real-world DevOps and Kubernetes environments. My goal is to share practical knowledge, help others in their cloud-native journey, and ultimately document the path from DevOps Engineer to Kubestronaut.
After sharing my Kubernetes journey, preparation strategy, exam-day experience, and the mistakes I made along the way, I wanted to create something more practical.
One of the biggest lessons I learned while preparing for the Certified Kubernetes Administrator (CKA) exam is that success is not just about knowing Kubernetes concepts. It is also about working efficiently under time pressure.
The CKA exam is a hands-on, performance-based certification. Every minute matters. The candidates who perform well are usually the ones who know how to quickly navigate Kubernetes documentation, use kubectl efficiently, and troubleshoot problems without wasting time.
In this article, I’ll share the commands, aliases, and documentation techniques that helped me during my preparation and exam.
The first thing I did in every lab environment was create aliases.
alias k=kubectl
Instead of typing:
kubectl get pods
I could simply write:
k get pods
This may seem small, but during dozens of tasks it saves a significant amount of time.
I also enabled shell completion:
source <(kubectl completion bash)
complete -F __start_kubectl k
One of the biggest mistakes beginners make is manually writing YAML files from scratch.
Use kubectl generators whenever possible.
Example:
k create deployment nginx \
--image=nginx \
--dry-run=client \
-o yaml > deploy.yaml
Then simply edit the generated file.
This saves time and reduces syntax mistakes.
If I had to choose only a few commands for CKA preparation, these would be my top picks:
k get pods -A
k get nodes
k describe pod
k logs pod-name
k exec -it pod-name -- bash
k get events --sort-by=.metadata.creationTimestamp
k top nodes
k top pods
These commands solve a large percentage of troubleshooting tasks.
Many exam questions involve multiple clusters.
Always verify your current context:
kubectl config current-context
Switch contexts quickly:
kubectl config use-context cluster1
A wrong context can cost valuable points.
Many resources exist in specific namespaces.
Always verify:
k get ns
Set namespace quickly:
kubectl config set-context --current --namespace=production
This avoids repeatedly typing:
-n production
Many candidates think using documentation means they are weak.
In reality, using documentation efficiently is part of the exam strategy.
The Kubernetes documentation is available during the exam.
I frequently used:
Kubernetes Tasks
Kubernetes Concepts
kubectl Reference
API Resource Documentation
Instead of memorizing everything, learn where information is located.
Use the search bar effectively.
Examples:
Search:
network policy example
persistent volume claim
rbac rolebinding
kubectl rollout restart
Finding an example quickly is often faster than trying to remember syntax from memory.
This is probably the most important lesson.
Never assume a task is complete.
Always verify.
Example:
k get pods
k describe pod
k logs pod-name
A deployment that looks correct may still be failing.
Verification saves marks.
The CKA exam is heavily focused on troubleshooting.
Practice:
CrashLoopBackOff
ImagePullBackOff
Failed Scheduling
Service Connectivity Issues
Storage Problems
Network Policy Problems
The more troubleshooting you do, the more comfortable you’ll feel during the exam.
The biggest breakthrough in my preparation happened when I stopped trying to memorize commands and started understanding how Kubernetes components work together.
Understand:
Pods
Deployments
Services
Storage
Networking
RBAC
Once the concepts are clear, the commands become much easier to remember.
alias k=kubectl
k get all -A
k get pods -A
k get nodes
k describe pod POD
k logs POD
k exec -it POD -- bash
kubectl config current-context
kubectl config use-context CONTEXT
k create deployment nginx \
--image=nginx \
--dry-run=client -o yaml
k top nodes
k top pods
k get events \
--sort-by=.metadata.creationTimestamp
The CKA exam does not reward memorization. It rewards practical Kubernetes skills, efficient troubleshooting, and effective use of available resources.
The commands and techniques shared in this article helped me save valuable time during preparation and exam day. More importantly, they improved my confidence when working with Kubernetes in real-world environments.
Every shortcut, alias, and documentation trick may save only a few seconds — but those seconds add up quickly during a two-hour performance-based exam.
LinkedIn: https://www.linkedin.com/in/shahzadaliahmad/
LFX Profile: https://openprofile.dev/profile/shahzadahmad91
Credly: https://www.credly.com/users/shahzadahmad
Website: https://shahzadahmad.dev/
Follow me for more Kubernetes, CNCF, DevOps, and cloud-native content.