I deploy my web application using Auto DevOps pipeline to kubernetes cluster. I utilize a custom helm chart. I have problem with 2 scenarios
- When ImagePullPolicy: Always:
In this case the application get deployed on the kubernetes cluster, runs successfully. But, it gives ImagePullBackoff error when the pod restart. The pod is not able to pull docker image from gitlab container registry.
- Where ImagePullPolicy: IfNotPresent:
In this case, the pod doesn’t get upgraded even if there is a new image in build stage.
Currently, the image tag I have set to
latest. From the stackoverflow I got a suggestion that I could use build image sha256 as tag. I think it will solve my problem.
I have two questions.
- Why the pod gives ImagepullBackoff error if the dockerjson certificate present on the kubernetes cluster?
- Why the helm chart doesn’t upgrade the pod when ImagePullPolicy is set to IfNotPresent?
- how can I get image sha256 in custom helm chart?