I apologize in advance if I use wrong terminology or express my question unclearly because I'm fairly new to Kubernetes/Docker.
Yesterday I built a Docker image on DockerHub and deployed it in Kubernetes and the pod runs fine with no errors.
Today I made a Github branch from the same repository as yesterday - made sure that they were the same exact code with Github Compare - so the 2 branches have identical code. I built a Docker image using this new branch, and when I deployed it in Kubernetes, my pod errored and would not run, and the error was something to do with cannot import name X.
I exec -it into the pod and ran the Python import line that it errored out on and it imported successfully without any warnings or errors. From my understanding, the Dockerfile commands are ran in the containers so if it can import inside the container, then the Docker image should be able to import as well?
My question is how can I debug/fix this issue of two identical Github repositories/code not behaving the same in Kubernetes when their Docker images are deployed.
p.s. - I bounced the working image from yesterday and it works fine still. The .yaml files are all the same, the only thing I change is the Docker tag. I also did docker inspect
on the two Docker images and their layers are identical.