Fix Issue with VolumeMounts in Kubernetes - issues with failed task

Hi @rahul456 @Tej-Singh-Rana @Ayman

I have an open task review at KodeKloud Engineer | Real Project Tasks on Real Systems

The pod had two containers - one for php and the other for nginx with volumes mounted at different locations. My solution was to modify the configmap (which contains nginx.conf) and set nginx root directory to accommodate both mount points. This approach yielded the right result (phpinfo()). However the task got failed on the grounds that volumes are not correctly mounted. I think that this is incorrect because the volumes were mounted correctly just that the mount point are different on each container.

The task didn’t suggest any particular approach to solving this task. So I assumed that the goal is to get the web app to run, which I technically achieved.

Could you please take a look at this for me?

Thank you

Well, the task has passed. exported pod, deleted it, edited the exported yaml file to change mount point to /var/www/html and then recreated the pod.

Please update the question to give better contexts. For example, you can indicate not to modify the configmaps

Thank you

1 Like