Ninad Desai:
Hi @Tej_Singh_Rana /@Mohamed Ayman /Team, while solving Mock test 2 of CKAD; for below question, even though I believe I have correctly configured pod (please also see the screenshot of my yaml) , by the time I complete the test, pod goes into “completed” mode and hence in test result , it shows as “fail”. If I immediately try to delete the pod and run same configurations yaml file to create again and test again the result , it shows as “success”. Is this a bug or am I doing anything wrong ?
Ninad Desai:
can someone advise on this please ?
Tej_Singh_Rana:
Hello, @Ninad Desai
You’ve performed that question correctly as I can see. Maybe validation looking for an active pod that time.
Ninad Desai:
Thanks @Tej_Singh_Rana for confirmation. Similar challenge i faced for another question below where I could cross-verify that my config file and pod creation is correct but while testing, its showing as failed with reason like: “is command configured correctly for 2nd container”
Ninad Desai:
is this also a kind of buy with mock test 2?
Tej_Singh_Rana:
As I can understand the question, we have to use command field instead of args
Ninad Desai:
have tried that as well … (you can ignore the command used for 1st container below as later i removed it)… still it wasnt working
Mohamed Ayman:
Regarding multi-pod:
To pass the lab validation, you can use command: ["/bin/sh", "-c", "sleep 4800"]
Mohamed Ayman:
Please check the following:
Mohamed Ayman:
apiVersion: v1
kind: Pod
metadata:
labels:
run: multi-pod
name: multi-pod
spec:
containers:
- image: nginx
name: jupiter
env:
- name: type
value: planet
- image: busybox
name: europa
command: ["/bin/sh", "-c", "sleep 4800"]
env:
- name: type
value: moon