Kubernetes Certification- Crack the CKA with WeMakeDevOps #CKA crash Course#CKA questions#ExamTips2

What we have to remembers ? (WeMakeDevOps)
#CKACrashcourse with WeMakeDevOps

If you are preparing for CKA than don’t worry we are here to help you out.
Crack The CKA with #WeMakeDevOps

What we have to remember ?

There are only 5 kubernetes command’s that covering around 60% of CKA exam, make strange but Yes it is.

1) kubectl api-resources
2) kubectl explain API-Resources

Follow “https://www.youtube.com/watch?v=wY97AmvFDfs&t=2s” for above 2 kubernetes command’s in our previous recording.
Setup on your K8s via K3s follow this link “https://www.youtube.com/watch?v=lnz0jEE3aNQ&t=1s”

3) POD Manifest file or POD creation via Command Line

Recommended Command by #WeMakeDevOps

kubectl run –generator=run-pod/v1 nginx –image=nginx –dry-run -o yaml

Don’t Use: “kubectl run nginx –image=nginx –restart=Never –dry-run -o yaml” #WeMakeDevOps

–limits cpu=10m,memory=10Mi –requests cpu=2m,memory=2Mi
Use help command to get more extend “kubectl run –generator=run-pod/v1 nginx –help”

CKA Exam Questions(Its same level of Questions that we experienced while passing the exam ):

Direct Questions on above Command

Create a Pod named nginx in nginx Namespace ?

name=nginx ,image=nginx,namespace=nginx

kubectl run –generator=run-pod/v1 nginx –image=nginx –namespace=nginx

Twist: You need to create namespace before that 🙂

kubectl create namespace nginx

Create a Pod that having 3 container in it ? (Multi-Pod)


Solution: Create a pod-manifest file for a container and append Container section for rest images.
kubectl run –generator=run-pod/v1 nginx –image=nginx –dry-run -o yaml and put in multipod.yaml file

Now Append multipod.yaml for rest of images
Create below 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and veryfy the same ?
a) nginx-dev1, labelled env=dev b) nginx-dev2, labelled env=prod

kubectl run –generator=run-pod/v1 nginx-dev1 –image=nginx –labels=env=dev -o yaml
kubectl run –generator=run-pod/v1 nginx-dev2 –image=nginx –labels=env=prod -o yaml

Verify the labels :
kubectl get pods –show-labels

Indirect Questions:
We will do in following recording


Avatar of WeMake

By WeMake

6 thoughts on “Kubernetes Certification- Crack the CKA with WeMakeDevOps #CKA crash Course#CKA questions#ExamTips2”
  1. looks like –generator is already deprecated.

    kubectl version
    Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:48:36Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

    kubectl run –generator=run-pod/v1 nginx –image=nginx
    Flag –generator has been deprecated, has no effect and will be removed in the future.
    pod/nginx created

  2. Hi Bro, I have tried as you said, but got below error bro" Flag –generator has been deprecated, has no effect and will be removed in the future". So Generator should not use ????? Please confirm bro

  3. bro i have understanding about kubernetes concepts and commands and watched your 5 videos can i go head and attempt the exam?

Leave a Reply

Your email address will not be published.

Captcha loading...