Kubernetes - Lab: CKAD Mock Exam 1 - Question 1

This is regarding: Kubernetes - Lab: CKAD Mock Exam 1 - Question 1

For me Question 1 answer shows incorrect even though I created yaml file to create containers as per description. When I compared my solution with the solution provided by Kodekloud only thing difference is below configuration in yaml file.

**command:**

** - /bin/sh**
** - -c**
** - sleep 3600;**
In the question description it is not mentioned to add a “sleep” command then why Kodekloud solution has sleep command in yaml file for creating containers and my solution showing incorrect? Can someone advise what I am missing here ?

The question states “All containers should be in the running state”.

On the busybox containers, if you do not add a sleep command then the container has no work to do so they will continually exit. This means they are not in the running state.

It probably doesn’t require exactly 3600 seconds for sleep, but it should be enough seconds to last longer than the exam time so when it is marked at the end it is still running.

2 Likes

This explanation helps. Thank you!