Skip to main content
Pierre Pook

3 months ago

How to set up vi correctly for CKAD exam?

Hi I have booked an exam :) But have not sued vi much but everytime I do I have to set the following settings  - autoindent, smartindent and shiftwidth=2.

I have tried to set a .exrc file and have them in  there but not luck. Does any but have any tips or hints about setting up vi in the exam to safe time? other than the kube autocompletion? ANy other tips is greatly appreciated!

Image of
3 months ago

I tend to stick with the defaults settings in most cases, but i understand wanting to have it set up so you can perform at your best on the exam. We have a course on vi that might be helpful to you. It's not a very long course, but it will help you get more familiar with vi, and it has some hands on labs you can practice with as well. Here's the link: Good luck on the exam!!

Image of Pierre Pook
Pierre Pook
3 months ago
Image of kursattokpinar-d9f7dd1b
3 months ago

I go with vi ~/.vimrc at every startup, probably I'll do the same at the exam :)

Content of the file is:
set nu
set expandtab
set shiftwidth=2
set tabstop=2

Takes few seconds to edit, but saves much more time during the exam. It's also safe to use in real exam, as it is suggested in many blogs (see:

Good luck with the exam!
Image of priyeshkannan
1 week ago
I recently took CKAD exam ,  2 basic steps that I did before starting the exam
1.  update  ~/.vimrc file as suggested by  Kursat.
2.  source <(kubectl completion bash)
During the exam,
1.  Always ensure you have selected the correct context. (kubectl config set-context) ,
2. Never forget  kubectl --dry-run to generate yaml whereever possible. Since searching documentation will take time.

The above really helped me in my exam.