I have copied a file "sample.txt" into the container using the ADD command in Dockerfile.
While running as a container, the 'sample.txt' file is present inside the container.
But while running as a kubernetes pod the copied 'sample.txt' file is missing.
Please help me to understand why this is happening.
I had this issue. I was mounting an emptydir volume on top the files I had copied. Check your yaml file and see if this is the case.
can you run below command and check if the file is present
docker run -it <image-name> /bin/sh