Dear KodeKloud Support Team,
I hope you are doing well.
I am writing to report an issue I encountered while working on a lab in KodeKloud Engineer related to Kubernetes shared volumes using an emptyDir . Despite following the instructions carefully and successfully deploying the pod, the lab validation appears to behave inconsistently.
Lab Details
- Platform: KodeKloud Engineer
- Topic: Kubernetes – Shared emptyDir Volume
- Pod Name: webserver
- Volume Name: shared-logs
- Container Names: nginx-container and sidecar-container
Issue Description
I created the pod as instructed, mounted the shared emptyDir volume at /var/log/nginx in both containers, and ensured that both were running. However, when verifying the logs from the sidecar container, the expected log files were not consistently accessible or populated.
Additionally, the Nginx container was configured with a sleep command, which prevents it from generating logs. This makes it difficult to validate whether the shared volume is functioning as intended. As a result, the task validation appears misleading or unclear.
YAML Configuration Used
apiVersion: v1
kind: Pod
metadata:
name: webserver
spec:
containers:
- name: nginx-container
image: nginx:latest
command: ["sleep", "360000"]
volumeMounts:
- name: share-logs
mountPath: /var/log/nginx
- name: sidecar-container
image: ubuntu:latest
command:
[
"sh",
"-c",
"while true; do cat /var/log/nginx/access.log /var/log/nginx/error.log; sleep 30; done"
]
volumeMounts:
- name: share-logs
mountPath: /var/log/nginx
volumes:
- name: share-logs
emptyDir: {}
Request for Assistance
Could you please:
- Verify whether the lab instructions and validation criteria are correct?
- Confirm if the Nginx container should run with its default configuration instead of the sleep command.
- Provide clarification or update the lab if necessary.
I have attached screenshots for your reference. Your guidance and support would be greatly appreciated.
Thank you for your continuous efforts in providing high-quality learning resources.
Best regards,
Pranav

