Hi - I was writing 1st Mock exam and found an issue with the answer.
Question was -
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-ckad06-str.
-
The main container should use the nginx image and mount a volume called grape-vol-ckad06-str at path /var/log/nginx.
-
The sidecar container can use busybox image, you might need to add a sleep command to this container to keep it running. Next, mount the same volume called grape-vol-ckad06-str at the path /usr/src.
-
The volume should be of type emptyDir.
Answer given in the kodekloud page is -
How initContainer is not part of the answer as in the question it is talking about sidecar container ??