Tips on preparing for Certified Kubernetes Application Developer (CKAD)
Commands shared in the PPT
kubectl run nginx –image=nginx (deployment)
kubectl run nginx –image=nginx –restart=Never (pod)
kubectl run nginx –image=nginx –restart=OnFailure (job)
kubectl run nginx –image=nginx –restart=OnFailure –schedule=”* * * * *” (cronJob)
kubectl run nginx -image=nginx –restart=Never –port=80 –namespace=myname –command –serviceaccount=mysa1 –env=HOSTNAME=local –labels=bu=finance,env=dev –requests=’cpu=100m,memory=256Mi’ –limits=’cpu=200m,memory=512Mi’ –dry-run -o yaml – /bin/sh -c ‘echo hello world’
kubectl run frontend –replicas=2 –labels=run=load-balancer-example –image=busybox –port=8080
kubectl expose deployment frontend –type=NodePort –name=frontend-service –port=6262 –target-port=8080
kubectl set serviceaccount deployment frontend myuser
kubectl create service clusterip my-cs –tcp=5678:8080 –dry-run -o yaml
source
Nice exlain!! but for today date this video is outdated. Plus this video is recommended in Mumshad's course. Hope this is not just because you have taken subscription of KodeKloud
Some more Tips:
1. Use two screens and one tab in each. Makes it much faster than switching tabs or windows.
2. If you are not well versed with vim/nano use the Exam notepad as a text editor. Mouse comes in really handy while doing copy/paste.
From comments below watch video but do try to practice new commands
Context are already provided or you need to create them by yourself, and, in case, they give you all the instructions in case?
Thank you,
A.
"kubectl run" does not create "Deployment" anymore with the latest kubernetes versions, better to update it here too.
"kubectl run nginx –image=nginx" => this will only create pod
by the way, a very good and helpful video, thanks.
Thanks for the tips
the 'kubectl run nginx –image=nginx –restart=OnFailure –schedule="* * * * *"' command won't work anymore it is deprecated
some extra tips:
in vi you can replace all tabs to spaces simply by:
<esc>:%s/t/ /g
(two spaces between / /)
if you want to expand tabs and stuff easily and correctly, just edit .vimrc and place this command there:
set ts=2 sts=2 sw=2 et
which means: tabstop=2 softtabstop=2 shiftwidth=2 expandtab
or perform this command in the vim editor itself on the : but then it is only valid for that session…
You can quickly set up a short .vimrc which will help navigate yaml files:
syntax on
filetype plugin indent on
set cursorcolumn
set cursorline
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
If you are spending time memorizing unix one-liners, it might be worth it to familiarize yourself with vim over nano.
Pro-tip: Don't use YAML, use JSON. JSON is not sensitive to white-space.
If you use vi you can set the config ':set expandtab' to convert any tabs into spaces. In this way, you can copy and paste from documentation without any problem.
many of these Qs are deprecated
"kubectl run" will always create a POD only by applying other flags won´t create different objects
thank you!.
Thank you for tips! I googled bash exercises and nano videos and mumshad's course covers the rest. Keep up the helpful videos your very good at explaining things 🙌
5th command should be like this:
kubectl run nginx
-image=nginx –restart=Never –port=80 –namespace=myname –command –serviceaccount=mysa1 –env=HOSTNAME=local –labels=bu=finance,env=dev –requests='cpu=100m,memory=256Mi' –limits='cpu=200m,memory=512Mi' –dry-run -o yaml –/bin/sh -c 'echo hello world'Hi Murali, Can you please clarify the following:
1) If I can use the Yaml Definition files of various objects say (volumes, pvc etc) from the official documentation during the CKAD exam. Its very difficult to memorize all the fields, especially sub-fields.
2) Please suggest if all the questions weigh same points or few questions carry more marks than others.
thanks for the video and the valuable tips provided
@ ~11:00 when you discuss using contexts, I assume that you have previously created the context, mycontext? Otherwise, by only running `kubectl config set-context mycontext –namespace=mynamespace`, without defining a "user" or "cluster", you would not be able to view any existing resources in that namespace even if you have set the "mynamespace" context as your current context (i.e. `kubectl config use-context mynamespace`). Can you please confirm as I think this may cause confusion for viewers?
For the Unix tips presented at ~20:45, it would be really helpful to show exactly how these can be used in the context of a typical exam question. It's not clear exactly how these commands could be used or why they're useful. This would make for a great follow-up video or blog post.
It seems you have deployed a kubernetes cluster locally.
Can you tell , what did you do to set up ? I tried doing so on Win 7 , but it somehow fails with miniukube.
It's great info, thank you Murali. How much time it will take to prepare for this exam. I have no experience on kubernetes and just started learning
I have attempted exam yesterday, command like kubectl run nginx –image=nginx –restart=OnFailure –schedule="* * * * *" would fail in kube 1.18, need to use kubectl create cronjob/deploy/job etc
Wonderful tips mate. btw which version of Kube you had on your exam? 1.18?
Thank you! Very helpfull!
can you share the ppt with me ?
Great information Murali. God bless you. Would be great if you could paste those commands in description.
good tips, thanks.
Great tips, mate ! Would you be able to share the PPT ?
Thanks for sharing the tips. This is very useful !
Great tips, well done.
This is useful. Thanks
Hello, thanks for sharing.I have some question if you please shere your info with me. [email protected]gmail.com
can u share the ppt ?
Hi Murali, Thanks for your video and all the valuable tips. Its really amazing and very helpful and useful. When you got a chance, please drop a note to me … [email protected]gmail.com
thanks for sharing