for question 5 , there is no metion about use of initcontainer yet the script marks my solution as wrong with the static solution containing init container.SECTION: STORAGE
Solve this question on: ssh cluster1-controlplane
There is a requirement to share a volume between two containers that are running within the same pod. Use the following instructions to create the pod and related objects:
-
Create a pod named grape-pod-cka06-str.
-
The main container should use the nginx image and mount a volume called grape-vol-cka06-str at path /var/log/nginx.
-
The sidecar container can use busybox image, you might need to add a sleep 7200 command to this container to keep it running. Next, mount the same volume called grape-vol-cka06-str at the path /usr/src.
-
The volume should be of type emptyDir. for this question does the sie car container always mean a init contaainer?
This looks like you’re doing the ultimate CKA mock exam, so you should really also please include which exam number, besides the question number.
That said – the Linux Foundation recently adopted the definition of sidecar containers from this page in the docs, which defines a sidecar container as:
- Using an initContainer
- Setting its RestartPolicy to Always.
In the exam, just like here, they expect you to know that now. Using a regular container as a sidecar, for that reason, will no longer work n the exam. So we’re doing that as well.
Please read this article that was recently added to the course
so if I am deploying the sidecar without sidecar , will it be marked as wrong I can score with a side car too?
What used to be called a sidecar before kubernetes 1.29 (that is, additional containers under containers: section), is now called co-located container
A sidecar container now means a container in the initContainers: section with restartPolicy: Always
Linux Foundation says:
This means that whenever we want candidates to create a sidecar container, it is aligned with the official doc’s definition of sidecar, and if we want candidates to create a co-located container (the old way), we ask for a co-located container.
This is how the real exam will mark it and therefore how we now mark it. So if you mix up these definitions, then you will not score.
Thanks Alistair, just a follow up , the quoted part is available publically on any URL ?
I believe he filed a issue in his LF account form and they replied to him, so there’s no public URL.
That is exactly what I did @chandankode
I often file tickets with LF for clarification on exam requirements.