If I want to create a pod with a command running, such as a busybox with ‘sleep 5000’. I like to do an imperative command, such as “kubectl run example --image=busybox --dry-run=client -o yaml – sleep 5000”, as an easy example.
This produces the following
spec:
containers:
- args:
- sleep
- “5000”
image: busybox
name: example
The kubernetes documentation shows:
containers:
- name: example
image: busybox
command: [“sleep”]
args: [“5000”]
KodeKloud wants the following to be used:
containers:
- name: example
image: busybox
command:- sleep
- “5000”
While these are slightly different on how they are performed on the pod, they essentially do the same thing (correct me if I’m wrong). Is there a specific way to do this according to the CKA? Or does the CKA really just want the results, which is a command ran inside the container, however you choose to do it? I think KodeKloud is being picky, but unsure if CKA is that picky.
I’ve also noticed some other questions are being flagged as the way the YAMLs are created, but the results are the same. Such as editing secret keys instead of editing the deployment. CKA exam would really just make the solution works, yes?