CKAD Exam Guide for 2024

Sajith vijesekara
3 min readJan 13, 2024

--

CKAD Preparation Guide

In the year 2024, I started with good news, I had cleared my CKAD exam and I thought to share my experience to prepare and face the exam.

Background

I have done projects in the last 4 years using the k8 environments. Though I have worked on projects I thought to prepare for certification and prove I know k8. My first choice was to start CKA and decided to start CKAD first and then moved to CKA.

Materials

  1. Mumshad Mannambeth this udemy course I have followed.
  2. KillerCode this Tutorial link
  3. K8 Documentation https://kubernetes.io/docs/home/
  4. For Network policies this repository is very useful
  5. This GitHub repository is ok but some of the content is outdated.

Prepare for Exam

The main challenge in this exam is time management. you will get 16–22 questions ( for me it is 16 questions ). Time is enough and don’t spend on questions if you don’t remember or have difficulty when identifying the issue. Just flag the question and move to the next one. That way at the end of the exam you can see that time is enough for the exam. Another thing needs to having to remember some of the imperative commands it will reduce your time searching the official documentation. Here at the end, I will add the commands I have noted while preparing for the exam.

The next thing is please make sure to complete the free two mock exams provided by Killercode. It will help to familiarize with the environment. especially how to copy and paste from official documentation to the remote desktop terminal.

From My Note Book

This is the list of commands I have put in my note.

  1. Short Keys
export do=" - dry-run=client -o yaml"
export now=" - force - grace-period 0"

2. Most used commands

// cronjobs 
k create cj cj1 -oyaml --dry-run=client --schedule="* * * * *" --image=busybox

// pods
k run nginx --image=nginx --restart=Never --port=80
k exec my-pod -- ls
k exec -it mynginx -- pwd
kubectl run busybox --image=busybox --command "sleep" -- "5000"
k set image pod/nginx nginx=nginx:1.7.1
k get po -l app=v6
K get logs -f my-pod -c <init-cotainer>
k run mynginx --image=redis --env=SAMPLE=user
k top po -n rcluster --sort-by memory --no-headers // filter pods

// quota for node
k create quota myquata --hard=copu=1,memory=1G,pods=2

// deployments
k set image deployment.v1.apps/nginx nginx=nginx:1.7.1
k scale rs --replicas=5 frontend
k scale deploy --replicas=4 demo


// service
k expose pod redis --port=6379 --name redis-service $do -o yaml > service.yaml
kubectl expose deployment nginx --port=80 --target-port=8000
kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https
k expose pod redis --port=6379 --type=NodePort --name redis-service


// Configs Maps
k create cm my-test —from-literal=key=value —form-literal=key=val

// Secrets
k create secret generic db-secret --from-literal=DB_Host=sql01 --from-literal=DB_User=root --from-literal=DB_Password=password123

// Service Account

k create sa my-test

// Taints for node

kubectl taint nodes node01 spray=mortein:NoSchedule

Remove Taint ( add - end of line)

kubectl taint nodes node01 spray=mortein:NoSchedule-

// deoployment rollout

kubectl rollout history deployment/nginx-deployment

k rollout undo deployment/nginx-deployment


// Ingress

k create ingress ingress-pay -n critical-space --rule="/pay=pay-service:8282" --dry-run=client -o yaml > ingress2.yaml

k get ingress

// Roles

kubectl create role foo --verb=get,list,watch --resource=pods,pods/status

k auth can-i create nodes — as dev-user


// View Contexts

k config view
k config use-context sajith@production

// cluster roles
k get clusterroles
k get clusterrolebindings

// labels
kubectl label nodes my-node app=backend


// Update deployment specs

k set resources deploy redis --requests=cpu=0.2 --limits=cpu=0.5


// helm commands

healm list

uninstall

helm uninstall <> -n namespace release_name

healm install internal-issue-report-apache bitnami/nginx --version=1.0.0

Update repos's
helm repo update

Set Values in install

helm install q30 bitnami/nginx -n helm-test --set replicaCount=2

// RBAC Commands

k auth can-i get secret/sajith100 --as sajith

Answer : # no

k create role thinkrole --verb=get,create,list --resource=secret --resource-name=sajith100


k create rolebinding sajith100binding --role=thinkrole --user=sajith


k auth can-i get secret/sajith100 --as sajith

answer : # yes

If you are planning to sit CKAD 2024 this post will help to prepare for your exam. will see you in another post regarding CKA in the next couple of months.

--

--

Sajith vijesekara

Technical Lead. Passionate about cloud computing & web security | Freelance Mobile Developer| CKAD | AWS Community Builder 🇱🇰