Create a Pod with main container busybox and which executes this "while true; do echo `Hi I am from Main container' >> /var/log/index.html; sleep 5; done" and with sidecar container with nginx image which exposes on port 80. Use emptyDir Volume and mount this volume on path /var/log for busybox and on path /usr/share/nginx/html for nginx container. Verify both containers are running.
Answer(s): A
Exec into both containers and verify that main.txt exist and
Create an nginx pod and set an env value as 'var1=val1'. Check the env value existence within the pod
Create a pod with init container which create a file "test.txt" in "workdir" directory. Main container should check a file "test.txt" exists and execute sleep 9999 if the file exists.
Post your Comments and Discuss Linux Foundation CKA exam with other Community members:
Atsushi commented on January 13, 2024 That's good!! Anonymous upvote
Our website is free, but we have to fight against bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the CKA content, but please register or login to continue.