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
To pass the lab validation, you can use
command: ["/bin/sh", "-c", "sleep 4800"]
Please check the following:
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
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?
That command also correct but validation is looking for
["/bin/sh" "-c", "sleep 4800"] .
Now, if you’re worried about the official exam, both are correct. You can use any of them.
got it. Thank you!