Skip to content

Bug: Issue with imagePullPolicy on a deployment #9872

@jmischler72

Description

@jmischler72

Hello,
I encountered a weird issue with a deployment manifest that is using a local image

Waiting for deployments to stabilize...
 - deployment/<deploy> is ready. [2/3 deployment(s) still pending]
 - deployment/<deploy>: container 1 is waiting to start: <my-image>:5b0737433ed8db461f77b1cd1f1247b656be55455ad43b64553d149d4bafa0b8 can't be pulled
    - pod/<pod>: container 2 is waiting to start:  <my-image>:5b0737433ed8db461f77b1cd1f1247b656be55455ad43b64553d149d4bafa0b8 can't be pulled
 - deployment/<deploy> failed. Error: container 1 is waiting to start:  <my-image>:5b0737433ed8db461f77b1cd1f1247b656be55455ad43b64553d149d4bafa0b8 can't be pulled.
1/3 deployment(s) failed
  Warning  Failed     2m22s (x3 over 3m)     kubelet            Error: ErrImagePull
  Normal   Pulling    2m22s (x3 over 3m)     kubelet            Pulling image "<my-image>:b037a3e41ede9affbec1db26eef4df772cdff1446779aaf3fa056da188dd08b4"
  Warning  Failed     2m21s (x3 over 3m)     kubelet            Failed to pull image "<my-image>:b037a3e41ede9affbec1db26eef4df772cdff1446779aaf3fa056da188dd08b4": failed to pull and unpack image "docker.io/library/<my-image>:b037a3e41ede9affbec1db26eef4df772cdff1446779aaf3fa056da188dd08b4": failed to resolve reference "docker.io/library/<my-image>:b037a3e41ede9affbec1db26eef4df772cdff1446779aaf3fa056da188dd08b4": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

This is the deployment that was causing the issue :

apiVersion: apps/v1
kind: Deployment
metadata:
  name: <deploy>
spec:
  replicas: 1
  selector:
    matchLabels:
      app: <deploy>
  template:
    metadata:
      labels:
        app: <deploy>
    spec:
      containers:
        - name: 1
          image: <my-image>
          imagePullPolicy: Always
          ports:
            - containerPort: 80
    ...

When i remove the imagePullPolicy, its working, I stumbled upon this #9495, so i assume this issue should not be happening

> skaffold version
v2.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions