How I passed CKA — Kubernetes Administrator exam

I recently took the CKA exam and passed it with 94%. In this post, I’ll explain how I prepared for the exam and study tips for the CKA exam.

Work experience:

At zeotap, we use GKE (Google Kubernetes Engine) for deploying, managing our microservices applications. Since our infrastructure is in Google Cloud, it is a no brainer to go with GKE. GKE being a managed service, saved us a lot of operational burden. We only have to focus on the deployment of our applications, deployment strategies, storage etc. This gave me a good understanding on the core concepts of deployment — Pods, Deployments, DaemonSet, ReplicaSet, Services, Ingress, Deployment strategies etc.

Online Courses:

  1. Coursera’s Architecting with Google Kubernetes Engine Specialization

Though this is a comprehensive course about the GKE, it will give you a good understanding of Kubernetes in terms of developer perspective.

2. Kodekloud ‘s CKA with Practice Tests

I used this course solely for the exam preparation. With practice tests, mock tests, and hands on lab after each lecture, this course is an one stop shop for the exam.

Apart from this courses, I built a Kubernetes cluster from scratch following Kesley Hightower’s “Kubernetes the Hard Way

Exam format:

The exam is designed beautifully to test our competence in a hands-on, command-line environment. You will be given 24 scenario questions and expected to solve in the running cluster.

Exam tips:

  1. Create aliases for kubectl commands

Since you will be using ‘kubectl’ commands throughout the exam in command line, it would save you a lot of time when you create aliases at the beginning itself.

alias k=’kubectl’

alias kgp=’kubectl get pods’

alias kgn=’kubectl get nodes’

alias kgp=’kubectl describe pod’

alias krun=’kubectl run — generator=run-pod/v1 nginx-pod — image=nginx:alpine’

2. Core concepts

Practice how to create

  • a pod
  • multiple containers in a single pod
  • pod with init containers
  • deployments with multiple replicas, rollback a deployment
  • daemonsets
  • static pods
  • a service, expose a pod/deployment as a service
  • namespaces

3. Control plane/Node components

Understand the roles and functions of control plane components, node components in a kubernetes cluster.

For some of the questions, you have to know all the pieces involved to debug and troubleshoot.

For ex, if the pod is not getting scheduled even though nodes are available, then there could be an issue with kube-scheduler service.

If the kubectl commands are not working, then there could be an issue with kube-apiserver.

4. Storage and environmental variables

Understand how storage is being used in Kubernetes as Physical Volume, Physical Volume Claim. Different ways to pass the environmental variables to the application — from literal, via volume mount, configs, secrets etc.

5. Cluster upgrade/backup

Practice upgrading a cluster using kubeadm command. Backup and restore etcd. Add/remove a new nodes to the cluster.

6. Troubleshooting Failures

Failures can be caused by control planes, nodes, applications, or incorrect configurations. Make use of kubectl logs, /var/log/, docker logs to identify the failure and fix it accordingly.

I hope you find this post useful. Feel free to share your questions, comments and feedback.

Connect with me on linkedin —

Leave a Reply

%d bloggers like this: