CodexBloom - Programming Q&A Platform

Kubernetes Deployment implementation guide Pods with New Image Tag - ImagePullBackOff scenarios

๐Ÿ‘€ Views: 74 ๐Ÿ’ฌ Answers: 1 ๐Ÿ“… Created: 2025-06-29
kubernetes docker image-pull YAML

I'm confused about I'm working with an scenario with my Kubernetes deployment not updating the pods to use a new image tag. I have a deployment configured with image `myapp:latest` and I've recently pushed a new version of my application with the tag `myapp:v2.0`. However, after updating the deployment with the new image tag, my pods are exploring in `ImagePullBackOff` status. Iโ€™ve tried running `kubectl rollout restart deployment/my-deployment` to trigger an update, but the scenario continues. Hereโ€™s the deployment YAML Iโ€™m using: ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: my-deployment spec: replicas: 3 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp image: myapp:v2.0 ports: - containerPort: 8080 ``` Iโ€™ve checked the image repository and confirmed that `myapp:v2.0` exists. I also verified that my deployment is properly set up for pulling images from the private registry by ensuring that the necessary image pull secrets are in place. Hereโ€™s the relevant secret configuration: ```yaml apiVersion: v1 kind: Secret metadata: name: my-registry-secret type: kubernetes.io/dockerconfigjson data: .dockerconfigjson: <base64-encoded-dockerconfigjson> ``` I added this secret to the service account used by the deployment, but still, the new pods remain in `ImagePullBackOff`. The behavior message indicates that Kubernetes want to pull the image, but I can pull it manually using `docker pull myapp:v2.0` from my local machine. I've also verified that the Kubernetes nodes have access to the internet. Has anyone encountered a similar scenario or can provide insight into what might be going wrong? Is this even possible?