Certified Kubernetes Administrator (CKA) - Tips
CKA Tips
CKA Tips
- In this section we’ll provide some tips on how to handle the CKA exam and browser terminal.
General
- Study all topics as proposed in the curriculum till you feel comfortable with all
- Do 1 or 2 test session with this CKA Simulator. Understand the solutions and maybe try out other ways to achieve the same thing.
- Setup your aliases, be fast and breath kubectl
- The majority of tasks in the CKA will also be around creating Kubernetes resources, like it’s tested in the CKAD. So preparing a bit for the CKAD can’t hurt.
- Learn and Study the in-browser scenarios on https://killercoda.com/killer-shell-cka (and maybe for CKAD https://killercoda.com/killer-shell-ckad)
- Imagine and create your own scenarios to solve
Components
- Understanding Kubernetes components and being able to fix and investigate clusters: https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster
- Know advanced scheduling: https://kubernetes.io/docs/concepts/scheduling/kube-scheduler
- When you have to fix a component (like kubelet) in one cluster, just check how it’s setup on another node in the same or even another cluster. You can copy config files over etc
- If you like you can look at Kubernetes The Hard Way once. But it’s NOT necessary to do, the CKA is not that complex. But KTHW helps understanding the concepts
- You should install your own cluster using kubeadm (one controlplane, one worker) in a VM or using a cloud provider and investigate the components
- Know how to use Kubeadm to for example add nodes to a cluster
- Know how to create an Ingress resources
- Know how to snapshot/restore ETCD from another machine
CKA Exam Info
Read the Curriculum https://github.com/cncf/curriculum
Read the Handbook https://docs.linuxfoundation.org/tc-docs/certification/lf-handbook2
Read the important tips https://docs.linuxfoundation.org/tc-docs/certification/tips-cka-and-ckad
Read the FAQ https://docs.linuxfoundation.org/tc-docs/certification/faq-cka-ckad
Kubernetes documentation
- Get familiar with the Kubernetes documentation and be able to use the search. Allowed resources are:
- https://kubernetes.io/docs
- https://kubernetes.io/blog
ℹ️ Verify the list here
Default Locations
Object Name | Location | Resource |
---|---|---|
ServiceAccount | /var/run/secrets/kubernetes.io/serviceaccount | Token: /token </br> CA Cert: /ca.cert |
Kubelet | /var/lib/kubelet/pki | Client Cert: kubelet-client-current.pem </br> Server Cert: kubelet.crt |
The Test Environment / Browser Terminal
You’ll be provided with a browser terminal which uses Ubuntu/Debian. The standard shells included with a minimal install will be available, including bash.
- Laggin
- There could be some lagging, definitely make sure you are using a good internet connection because your webcam and screen are uploading all the time.
Kubectl
autocompletion and commandsAutocompletion
is configured by default, as well as the k alias source and others:kubectl
with k alias and Bash autocompletionyq
andjq
for YAML/JSON processingtmux
for terminal multiplexingcurl
andwget
for testing web servicesman
andman pages
for further documentation- Copy & Paste
- Copy and pasting will work like normal in a Linux Environment:
- What always works: copy+paste using right mouse context menu
- What works in Terminal:
Ctrl+Shift+c
andCtrl+Shift+v
What works in other apps like Firefox:
Ctrl+c
andCtrl+v
- Score
- There are 15-20 questions in the exam.
- Your results will be automatically checked according to the handbook.
If you don’t agree with the results you can request a review by contacting the Linux Foundation Support.
- Notepad & Skipping Questions
- You have access to a simple notepad in the browser which can be used for storing any kind of plain text.
It might makes sense to use this for saving skipped question numbers. This way it’s possible to move some questions to the end.
- Servers
- Each question needs to be solved on a specific instance other than your main terminal.
- You’ll need to connect to the correct instance via ssh, the command is provided before each question.
PSI Bridge
- Starting with PSI Bridge:
The exam will now be taken using the PSI Secure Browser, which can be downloaded using the newest versions of Microsoft Edge, Safari, Chrome, or Firefox
Multiple monitors will no longer be permitted
Use of personal bookmarks will no longer be permitted
The new ExamUI includes improved features such as:
A remote desktop configured with the tools and software needed to complete the tasks
A timer that displays the actual time remaining (in minutes) and provides an alert with 30, 15, or 5 minute remaining
The content panel remains the same (presented on the Left Hand Side of the ExamUI)
Read more here.
Terminal Handling
Bash Aliases In the real exam, each question has to be solved on a different instance to which you connect via ssh. This means it’s not advised to configure bash aliases because they wouldn’t be available on the instances accessed by ssh.
Be fast Use the history command to reuse already entered commands or use even faster history search through Ctrl r .
If a command takes some time to execute, like sometimes kubectl delete pod x. You can put a task in the background using Ctrl z and pull it back into foreground running command fg.
You can delete pods fast with:
k delete pod x –grace-period 0 –force
Vim Be great with vim.
Settings
In case you face a situation where vim is not configured properly and you face for example issues with pasting copied content you should be able to configure via ~/.vimrc or by entering manually in vim settings mode:
set tabstop=2 set expandtab set shiftwidth=2 The expandtab make sure to use spaces for tabs.
Note that changes in ~/.vimrc will not be transferred when connecting to other instances via ssh.
Toggle vim line numbers
When in vim you can press Esc and type :set number or :set nonumber followed by Enter to toggle line numbers. This can be useful when finding syntax errors based on line - but can be bad when wanting to mark© by mouse. You can also just jump to a line number with Esc :22 + Enter.
Copy&Paste
Get used to copy/paste/cut with vim:
Mark lines: Esc+V (then arrow keys) Copy marked lines: y Cut marked lines: d Past lines: p or P Indent multiple lines
To indent multiple lines press Esc and type :set shiftwidth=2. First mark multiple lines using Shift v and the up/down keys. Then to indent the marked lines press > or <. You can then press . to repeat the action.