2

I suffer from this error when I deploy a pod.

  • the image lies on google container registry within the same project as the cluster

  • i can pull the image from the registry on my local computer

  • i cannot pull the image if I ssh into the instance

From the docs it states that this should work out of the box. I checked and storage read access is indeed there.

Here's the config:

apiVersion: v1
kind: ReplicationController
metadata:
  name: luigi
spec:
  replicas: 1
selector:
  app: luigi
template:
  metadata:
    name: luigi
    labels:
      app: luigi
  spec:
    containers:
    - name: scheduler
      image: eu.gcr.io/bi/luigi/scheduler:latest
      command: ['/usr/src/app/run_scheduler.sh']
    - name: worker
      image: eu.gcr.io/bi/luigi/scheduler:latest
      command: ['/usr/src/app/run_worker.sh']

Describe gives me:

Failed to pull image "eu.gcr.io/bi/luigi/scheduler:latest": rpc error: code = Unknown desc = Error response from daemon: repository eu.gcr.io/bi/luigi/scheduler not found: does not exist or no pull access
shredding
  • 5,374
  • 3
  • 46
  • 77
  • Can you `ssh` into your node and verify that image exists. `docker pull eu.gcr.io/bi/luigi/scheduler:latest` – Shahriar Feb 09 '18 at 12:05
  • It gives the same error on the node. But the Image exists. I used the pull cmd from the dashboard and it works locally. – shredding Feb 09 '18 at 12:41
  • Can you verify your image? Does it really there? – Shahriar Feb 09 '18 at 13:42
  • What do u mean by verify? I can see it in the dashboard, i use the exact image repo and I can pull it locally on my computer from there BUT NOT from the actual instance in the cluster. – shredding Feb 09 '18 at 14:59

1 Answers1

0

From the error message, it seems to be caused by the absence of the credentials to download the image from the docker registry. Please note that this access credentials are "client specific". In this case, when kubernetes (kubelet to be specific) is the client and it needs the imagepullsecret to present the necessary credentials.

Please add the imagepullsecret with required credentials and it should work

pr-pal
  • 3,248
  • 26
  • 18