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

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)](https://www.credly.com/badges/e72821a9-97a5-4ee8-a7f6-93f40246e864/public_url) 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.

## **1\. Create Useful Aliases Immediately**

The first thing I did in every lab environment was create aliases.

```plaintext
alias k=kubectl
```

Instead of typing:

```plaintext
kubectl get pods
```

I could simply write:

```plaintext
k get pods
```

This may seem small, but during dozens of tasks it saves a significant amount of time.

I also enabled shell completion:

```plaintext
source <(kubectl completion bash)
complete -F __start_kubectl k
```

## **2\. Generate YAML Instead of Writing Everything**

One of the biggest mistakes beginners make is manually writing YAML files from scratch.

Use kubectl generators whenever possible.

Example:

```plaintext
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.

## **3\. Master These Commands**

If I had to choose only a few commands for CKA preparation, these would be my top picks:

```plaintext
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.

## **4\. Learn Context Switching**

Many exam questions involve multiple clusters.

Always verify your current context:

```plaintext
kubectl config current-context
```

Switch contexts quickly:

```plaintext
kubectl config use-context cluster1
```

A wrong context can cost valuable points.

## **5\. Use Namespace Shortcuts**

Many resources exist in specific namespaces.

Always verify:

```plaintext
k get ns
```

Set namespace quickly:

```plaintext
kubectl config set-context --current --namespace=production
```

This avoids repeatedly typing:

```plaintext
-n production
```

## **6\. Documentation Is Your Best Friend**

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.

## **7\. My Documentation Navigation Strategy**

Use the search bar effectively.

Examples:

Search:

```plaintext
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.

## **8\. Verify Everything Before Moving On**

This is probably the most important lesson.

Never assume a task is complete.

Always verify.

Example:

```plaintext
k get pods
k describe pod
k logs pod-name
```

A deployment that looks correct may still be failing.

Verification saves marks.

## **9\. Practice Troubleshooting Daily**

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.

## **10\. Focus on Understanding, Not Memorization**

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.

## **My Personal CKA Quick Reference**

```plaintext
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
```

## **Final Thoughts**

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.

## **Connect With Me**

LinkedIn: [https://www.linkedin.com/in/shahzadaliahmad/](https://www.linkedin.com/in/shahzadaliahmad/)

LFX Profile: [https://openprofile.dev/profile/shahzadahmad91](https://openprofile.dev/profile/shahzadahmad91)

Credly: [https://www.credly.com/users/shahzadahmad](https://www.credly.com/users/shahzadahmad)

Website: [https://shahzadahmad.dev/](https://shahzadahmad.dev/)

Follow me for more Kubernetes, CNCF, DevOps, and cloud-native content.
