This is about Mock Exam #2 question 8 Could somebody explain what exactly is wro . . .

kartik_kube:
This is about Mock Exam #2 question 8
Could somebody explain what exactly is wrong with the sleep command in the mutli-container pod? I am giving it correctly in container 2
@Tej_Singh_Rana @Vijin Palazhi
image.png
image.png

Mohamed Ayman:
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

kartik_kube:
Thanks @Mohamed Ayman
The commands that were produced in my code was generated imperatively using “–command sleep 4800”

Are you suggesting that the imperative command produced in the code is not correct?

Tej_Singh_Rana:
Hello, @kartik_kube
That command also correct but validation is looking for ["/bin/sh" "-c", "sleep 4800"] .

Tej_Singh_Rana:
Now, if you’re worried about the official exam, both are correct. You can use any of them.

kartik_kube:
got it. Thank you!