My Journey Through the Certified Kubernetes Administrator (CKA) Exam

I recently took on the challenge of the Certified Kubernetes Administrator (CKA) exam, and it was a real learning experience. As someone who’s been dabbling in Kubernetes for a while, I figured it was time to test my skills and see if I could get that certification. Here’s how it went down and what I learned along the way.

What is the CKA?

For those who might not be familiar, the CKA certification is designed by the Cloud Native Computing Foundation (CNCF) in partnership with The Linux Foundation. The goal is to test your practical skills in managing Kubernetes clusters. This exam is hands-on, which means you’re not just answering multiple-choice questions—you’re actually working on a live Kubernetes environment.

My Preparation Journey

I started my prep by going through some basic Kubernetes concepts like pods, deployments, services, namespaces, etc., just to refresh my memory. I realized that Kubernetes is such a vast ecosystem that I needed to focus on the core components—etcd, kubelet, kube-proxy, scheduler, and controller manager—because they form the backbone of any Kubernetes cluster.

I also went through the official CKA curriculum and did some exercises using platforms like Killercoda and Killer Shell. These sites offer free* interactive Kubernetes environments, which are great for practicing in a real-world scenario.

One thing that really helped me was setting up my own lab environment. I set up a multi-node cluster using Kubeadm and Calico. If you’re working on your own computer you can use something like Minikube. It is great for single-node clusters, but if you want to get the feel of managing a real cluster, setting up a multi-node cluster with Kubeadm on cloud is a must. I used Google Cloud for this. I setup 3 medium sized VM instances with 2vCPU, 4GB ram and 10GB disk space. I installed kubeadm, kubectl, kubelet, Calico and other resources on each node manually and used the kubeadm join command to connect each node to the controlplane.

The Exam Experience

Once I felt confident, I booked the exam. The exam is proctored online, and they have some strict rules. For example, you can’t have multiple monitors, and there’s a system check to ensure your environment is secure. You’ll be monitored the entire time, so keep that in mind.

The exam is broken down into several domains, with each section focusing on specific skills, like:

  1. Cluster Architecture, Installation, and Configuration
  2. Workloads & Scheduling
  3. Services & Networking
  4. Storage
  5. Troubleshooting

Each task in the exam is weighted differently, and you have to complete them within a certain time frame (but I won’t get into details about timing, since that’s not what this post is about).

Sample Questions and How I Approached Them

To give you a better idea of what the exam is like, here are a few sample questions that resemble the kind of stuff you’ll face. I’ll also explain my approach to solving them.


Sample Question 1:

“Create a pod using a specific image and expose it via a service.”

This one was straightforward. I used kubectl run to create the pod with the image specified in the question, and then used kubectl expose to create a service for it. Here’s what the command looked like:

kubectl run my-pod --image=nginx --restart=Never
kubectl expose pod my-pod --port=80 --target-port=80 --type=ClusterIP

Pretty simple, but you need to be careful with the details like the port numbers and service types.


Sample Question 2:

“Troubleshoot a pod that is stuck in the CrashLoopBackOff state.”

I encountered a few troubleshooting questions like this. The first thing I did was check the pod’s logs to see if there were any error messages:

kubectl logs <pod-name>

Then, I inspected the pod’s events:

kubectl describe pod <pod-name>

From the logs and events, you can often figure out if there’s an issue with the container itself, or maybe there’s a missing secret or config map. In my case, the pod had an incorrect environment variable, which I fixed by editing the deployment:

kubectl edit deployment <deployment-name>

Sample Question 3:

“Configure a network policy to restrict access to certain pods.”

This one was a bit trickier. Network policies are super important in Kubernetes for controlling traffic between pods. To solve this, I created a NetworkPolicy resource and applied it to the correct namespace:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-traffic
  namespace: default
spec:
  podSelector:
    matchLabels:
      app: my-app
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app: allowed-app

You have to be very clear about which pods are allowed to talk to each other and ensure your policy is applied to the right namespace.


Sample Question 4:

“Back up the etcd cluster data.”

etcd is the heart of Kubernetes—it stores all the cluster data. The exam may ask you to back up the etcd data. Here’s how I did it:

ETCDCTL_API=3 etcdctl snapshot save /tmp/etcd-backup.db \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key

This command saves a snapshot of etcd’s current state to a file. It’s good to know how to restore the snapshot as well, in case something goes wrong with the cluster.


What I Learned

The CKA exam isn’t about memorizing commands; it’s about understanding Kubernetes inside out. You need to know how things work behind the scenes, and practice is essential. I also realized that reading the Kubernetes documentation is super helpful. There’s no shame in using the docs during the exam—you’re allowed to refer to them, and it’s often faster than second-guessing yourself.

Post-Exam Reflection

Looking back, the experience was decent. Not only did I get to test my knowledge, but I also learned a ton along the way. Kubernetes is powerful, and getting certified is a great way to show that you understand the inner workings of this complex system.

If you’re thinking about taking the CKA, my advice would be: practice as much as possible in a real environment. Set up clusters, break things, and fix them.

Good luck to anyone preparing for the CKA—you’ve got this!