DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Kubernetes for Application Developers (CKAD)

Kubernetes for Application Developers (CKAD)

A blog about how to get certified as a Kubernetes developer (CKAD) with handy tips and tricks along the way

Ivo Woltring user avatar by
Ivo Woltring
·
Jan. 10, 23 · Tutorial
Like (8)
Save
Tweet
Share
6.80K Views

Join the DZone community and get the full member experience.

Join For Free

I was lucky. I already had extensive knowledge of Docker before starting the certification for Kubernetes developer (CKAD), and I have an employer that gives me the space and time to invest in myself.

So I claimed a week of preparation and did the whole Kubernetes for Developers (LFD259) course. To follow this course, you have to prepare a practice environment, and you are given instructions on how to do that on AWS or Google Cloud (which can result in extra costs). It is also very possible to create a cluster on your local machine. To make my life easier (and cheaper), I opted for the last option and created a vagrant setup with instructions for it here.

The LFD259 course covers everything needed for the certification, and it is created by the organization also responsible for the certification exam. Much of the course is self-study and reading. One of the downsides of this course was that if something went wrong and you had a question, you had to ask it on a forum, and responses to that forum could take a long time.

So to prepare even more, I bought the Udemy course Kubernetes Certified Application Developer (CKAD) with Tests. Normally this course is about $200,= but I bought it in a bundle (with Kubernetes for Administrators - CKA) for about $35,=. A good deal, as far as I am concerned. Udemy excels in video courses, and that visualization made the needed knowledge complete.

A nice extra of the Udemy course was that it came with prepared exercises on KodeKloud. Very nice! and with practice exams and lightning labs.

After a week of following courses and practicing a lot, I scheduled the exam. In all honesty, I was quite nervous. I scheduled my exam a week later for some extra practice, and that is what I did.

Practice, practice, practice. Speed is what you need!

Tips and Tricks

I have created a GitHub page with all the resources I used, with an extensive list of tips and tricks. Here are some of the more important ones.

Practice for Speed!

The biggest challenge is getting it all done within the allotted time. You have to complete 19 questions in two hours, and in that time, you have to write YAML files and edit them in one of the basic Linux editors (vi / nano). I recommend investing in vi knowledge as it is much more powerful than nano.

The mentioned Udemy course has a few lightning labs at the end of the course. If you can finish them within the given time, you are very much on track.

Use kubectl Over YAML as Much as You Can

YAML is a pain to write, and cut and paste can be a hassle with mixed tab and whitespace characters. So much can go wrong here!

Please don't write yaml files from scratch!

Use kubectl run with the dry-run (--dry-run=client -o yaml) option, whenever you can, to at least generate as much of the YAML as you can. Practice this a lot and find more options.

Shell
 
# this is much faster

kubectl create deploy mydeploy --image=nginx --port=80 --replicas=4 

#than

kubectl create deployment mydeploy --image=nginx --port=80

kubectl scale deployment mydeploy --replicas=4


And if you need to add more options not provided from the command line, use the dry-run:

Shell
 
kubectl create deploy mydeploy --image=nginx --port=80 --replicas=4 --dry-run=client -o yaml>mydeploy.yml
vi mydeploy.yml
# edit what you need done and apply/create


Create a Good Set of Bookmarks

You are allowed to have the kubernetes.io docs open in a second tab during the exam and this is powerful stuff. Create an extensive set of bookmarks pointing to all the needed examples. I have exported the bookmarks I used during my exam, and it was pure gold! Very useful.

Use Bash to the Fullest

Typing --dry-run=client -o yaml is very cumbersome every time you want a dry-run to generate a YAML, but by putting it in a variable, it becomes easy.

Shell
 
export DR='--dry-run=client -o yaml'


Now, if you want a dry run, you can just do:

Shell
 
kubectl create deploy mydeploy --image=nginx --port=80 --replicas=4 $DR >mydeploy.yml
#or
kubectl run hello --image=busybox $DR>hello.yml


This is just very basic stuff but saves a lot of time.

If you want to get fancier, do more!

Shell
 
source <(kubectl completion bash)
#setting the namespace (just do this one again for another namespace if needed)
export NS=default
# You will do dry runs often and now you can just type $DR in stead of the whole thing
export DR='--dry-run=client -o yaml'
# use k to run the kubectl command in the exported namespace. Saves typing
alias k='kubectl -n $NS'
# Now get code completion on the 'k' commands
complete -F __start_kubectl k


Now, this is a setup made for speed :-)!

You can use k instead of  kubectl with bash-completion (tab) on the command, and you can make it into a dry-run by just adding $DR to it. If you have to perform multiple commands on a different namespace, just perform this command first NS=otherns and use k again as normal. All this demands practice because you must not forget to change back to the default namespace again when needed, but they can be great time savers.

Useful Resources

  • CKAD-Resources - For many more tips, tricks, and useful links.
  • k8s-cluster - For a local VirtualBox/vagrant-based k8s cluster.
  • Kubernetes for Developers (LFD259) - Linux Foundation CKAD course
  • Kubernetes Certified Application Developer (CKAD) with Tests - Udemy CKAD Course
Kubernetes dev application Dry run (testing)

Published at DZone with permission of Ivo Woltring. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Why Every Fintech Company Needs DevOps
  • Type Variance in Java and Kotlin
  • 5 Factors When Selecting a Database
  • Simulate Network Latency and Packet Drop In Linux

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: