sha256 doesn't match across environments in kubernetes

6/1/2018

I am stuck at a weird problem. I am trying to make sure that 2 different environments (like Dev and Test) have the same image of my app, by looking at the sha256 using the following command

kubectl describe pod abc-auth-99f5f4565-g25bn
...
  abc-auth:
    Container ID:   docker://0baa598d2f52ae83a3b4af8325be59ca0f046463c21d3ef53e136a490eeec294
    Image:          abc-seal-tools:5000/abc-auth:valid-f-test
    Image ID:       docker-pullable://abc-seal-tools:5000/abc-auth@sha256:6a0918c36a084b454910b3bdd077d64640d8be8ab939b58ee0733651c8c69723

On one env I see sha256:6a0918c36a084b454910b3bdd077d64640d8be8ab939b58ee0733651c8c69723, but on another env I see a different sha256 one.

I am tagging the image as following in lower env as shown below

docker pull abc-seal-tools:5000/abc-auth:valid-f-test
docker tag abc-seal-tools:5000/abc-auth:valid-f-test abc-seal-tools:5000/abc-auth:valid-fe2ef-test
docker push abc-seal-tools:5000/abc-auth:valid-fe2ef-test
...
valid-fe2ef-test: digest: sha256:6a0918c36a084b454910b3bdd077d64640d8be8ab939b58ee0733651c8c69723 size: 2423

in the higher env, I am do the deployment of this app using

spec:
  containers:
  - name: abc-auth
    image: abc-seal-tools:5000/abc-auth:valid-fe2ef-test
    imagePullPolicy: Always

after deployment is successfull, I am doing a kubectl describe pod abc-auth and seeing a different sha256 for some reason.

Image ID:       docker-pullable://abc-seal-tools:5000/abc-auth@sha256:35ce6e5254eaf5b9d3c77d2606d99b5827aa9d694b7353448c9cacd3ba059b08

I don't get why the sha256 is not matching even though I am pulling the correct tag, any ideas will be appreciated gratefully

-- sbolla
docker
kubernetes

0 Answers