# Preparing for the CKA Exam: A Practical Guide

![k8s.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1667730783270/U1JanFblD.png align="left")

I’m currently preparing for the **Certified Kubernetes Administrator (CKA)** exam and wanted to share some key details and tips for success.

## Exam Details

* **Cost:** $395
    
* **Includes:** 2 exam attempts + 2 practice exams on [Killer.sh](https://killer.sh/)
    
* **Registration:** [Purchase here](https://www.cncf.io/certification/cka/)
    

## Preparation Resources

### 1\. Recommended Courses

A solid preparation course can help cover all the required topics. I personally recommend the [**CKA Udemy course**](https://udemy.com/course/certified-kubernetes-administrator-with-practice-tests), which provides a structured learning path.

### 2\. Setting Up a Local Kubernetes Environment

A hands-on approach is essential. Using **Minikube** is a great way to practice locally:

```sh
brew install minikube
minikube start
kubectl get po -A
```

While you can set a default text editor for `kubectl`, **vim** is the best option for speed:

```sh
export KUBE_EDITOR=nano  # (or vim, if you prefer)
```

### 3\. Recommended Shell Configuration

These shortcuts will save time during the exam:

```sh
alias k=kubectl  # Shorten kubectl commands
export do="--dry-run=client -o yaml"  # k create deploy nginx --image=nginx $do
export now="--force --grace-period 0"  # k delete pod x $now
```

## Kubernetes Command Cheat Sheet

Familiarizing yourself with essential `kubectl` commands is critical. Here are some common operations:

### Context Management

```sh
kubectl config get-contexts  # List available contexts  
kubectl config use-context my-ctx  # Switch to a specific context  
```

### Pod and Deployment Management

```sh
kubectl run nginx --image=nginx  # Create a pod  
kubectl get pods -o wide  # Get detailed pod info  
kubectl create deployment nginx --image=nginx --replicas=4 --dry-run=client -o yaml > nginx-deployment.yaml  
kubectl apply -f nginx-deployment.yaml  # Apply YAML configuration  
kubectl describe node cluster1-master1  # View node details  
kubectl scale --replicas=3 deployment/mysql  # Scale a deployment  
```

### Networking and Secrets

```sh
kubectl expose pod nginx --name=nginx-service --port=80  # Expose pod as a service  
kubectl create ns my-namespace  # Create a namespace  
kubectl -n secret create secret generic mysecret --from-literal=user=myuser --from-literal=pass=1111  
```

## Beyond `kubectl`: Other Important Tools

While `kubectl` is the main tool, you’ll also need to be comfortable with:

* **etcdctl** – Managing etcd backups & restores
    
* **vim** – Editing YAML files quickly
    
* **grep, wc** – Searching and counting lines in logs
    

## Key Topics to Master

These are crucial for the exam:

* **Static pods**
    
* **Etcd backup & restore**
    
* **Services and networking**
    
* **Persistent volumes and storage**
    

### Important Configuration Paths

Knowing where Kubernetes stores configurations will help troubleshoot issues faster:

* `/etc/kubernetes`
    
* `/etc/kubernetes/manifests`
    

## Exam Tips

* **You can use the** [**official Kubernetes documentation**](https://kubernetes.io/docs) **during the exam**—but only the CKA-specific sections.
    
* **Use bookmarks** for quick navigation in the Kubernetes docs (e.g., API references, troubleshooting guides).
    
* **Time management is key**—practice answering questions quickly and efficiently.
    

A curated [**CKA bookmarks folder**](https://drive.google.com/file/d/1gh9HIYoEP5iW8osayXOGncfSA5xCaN3Z/view?usp=sharing) is available online—search for one to speed up navigation.

---

By focusing on hands-on practice and efficient command usage, you’ll be well-prepared to tackle the CKA exam. Good luck! 🚀
