Certified Kubernetes Administrator Tips and Suggestion

Rudranil Sarkar
3 min readMay 10, 2020

--

Kubernetes is one of the leading container orchestration tools. As DevOps Engineer whose job is to support Developer in improving their software development process. I recognize the massive benefits it can offer to modern businesses.

Recently I passed Certified Kubernetes Administrator, and I like to share some tips , suggestion and few dumps question so you can clear the exam.

The CKA program is a hands-on exam offered by the Linux Foundation’s CNCF organization. This stringent and comprehensive exam is conducted online under a proctor’s oversight, and its total duration is 3 hours. You need to perform 24 tasks in 3 hours and It is not the toughest exam but way CNCF taking the exam is different than other exams no MCQ based question, only you need to perform certain basic tasks within 3 hours also read once candidate handbook. Mostly questions ask on Deployment, DaemonSet, Pod, Secret, Service, Namespace, and persistent volumes.
Prepare well Mumshaad`s lightning labs and mock exams for sure, also check his solution videos, the questions will be similar to them.

There will be 5 clusters you need to do context switching between the cluster and everything will mention on the question what to do, and in which context you need to perform the task.

source :- https://training.linuxfoundation.org/

Few suggestions were provided by my friend Vishnu (https://dvops.cloud/2020/04/28/cka-quick-tips/) which I followed during my exam.

  • Double-check the name of the pod/deployment, name of the container, service name, context, labels, and namespace (silly mistake-prone area).
  • You will be given a bastion host at first which has 5 contexts (clusters) already set. Make sure you are in the right context before starting the exam, it's mentioned on top of each question.
  • ssh access is provided for all 5 clusters (masters and nodes), ssh commands are already provided wherever required.
  • K8s version in the exam is 1.18 so certain commands change like --dry-run becomes --dry-run=client
  • Bookmark cheatsheet page — https://kubernetes.io/docs/reference/kubectl/cheatsheet/
  • Set autocomplete before starting — https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete
  • Use imperative commands as much as possible and edit as per the requirements of question :

kubectl create deployment nginx --image nginx --dry-run=client -o yaml > deploy.yaml edit deploy.yaml for any replica number changes and apply to create a deployment with 2 replicas.

  1. kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml to create a pod as pod.yaml
  2. kubectl expose pod/deployment --name nginx-service --type ClusterIP --port 80 --target-port 80 --dry-run=client -o yaml > svc.yaml to expose a pod or deployment,(Note never try to use label and selector)
  3. kubectl create secret generic db-secret --from-literal=password=confidential (no need to encode the secret, its encoded on its own this way)
  4. journalctl -u kubelet to get kubelet service logs
  5. systemctl status kubelet , systemctl restart kubelet and systemctl daemon-reload
  6. Make use of -l abc=ayz and --show-lables like kubectl get pods -l abc=xyz and kubectl get nodes --show-labels.
  7. Yes, you can copy the whole YAML from docs as well.
  8. You will have an ample amount of time so make sure to read (twice) and understand the question well before attempting.

Types of Question

  • Extract logs lines corresponding to error “unable_to_load” and write to a file (the path will be mention on that question).
  • List all Persistence Volumes order by name and write to file. or List all PV order by capacity
  • Deploy Nginx daemonSet and ensure it is running on each node and don’t override any taits, (so basically asking don't use any tolerance in your manifest file)
  • Deploy an init container and create a file in init container and that file should be available in the main container also (basically you need to mount volumes in both the container)
  • Create a multi-container pod.
  • Schedule a pod in a specific node. (use node selector)
  • Create a deployment with Nginx image and perform rollout(Please make sure use “— — record” flag on every command.)
  • Create a clusterIP service for a pod.

To know more about deployment strategy, follow the below article
https://spacelift.io/blog/kubernetes-deployment-strategies

Thanks, Mariusz Michalowski

Do practice well with Mumshaad’s video, Labs and above Questions.
Best of Luck for your Exam……

--

--