2

My pod does the following:

Warning Failed 21m (x4 over 23m) kubelet, 10.76.199.35 Failed to pull image "registryname/image:version1.2": rpc error: code = Unknown desc = Error response from daemon: unauthorized: authentication required

but other images will work. The output of

ibmcloud cr images

doesn't show anything different about the images that don't work. What could be going wrong here?

zcleghern
  • 827
  • 7
  • 21

2 Answers2

4

Given this is in kubenetes and you can see the image in ibmcloud cr images it most likely going to be a misconfiguration of your imagePullSecrets.

If you do kubectl get pod <pod-name> -o yaml you will be able to see the what imagePullSecrets are in scope for the pod and check if it looks correct (could be worth comparing it to a pod that is working).

It's worth noting that if your cluster is an instance in the IBM Cloud Kubernetes Service a default imagePullSecret for your account is added to the default namespace and therefore if you are running the pod in a different Kubenetes namespace you will need to do additional steps to make that work. This is a good place to start for information on this topic.

https://console.bluemix.net/docs/containers/cs_images.html#other

  • This was exactly it. These steps also helped us: https://console.bluemix.net/docs/containers/cs_dedicated_tokens.html – zcleghern Dec 13 '18 at 21:18
2

Looks like you haven't logged into the IBM Cloud Container registry. If you haven't done this yet, You should login with this command

ibmcloud cr login

Other issues can be

  • Docker is not installed.
  • The Docker client is not logged in to IBM Cloud Container Registry.
  • Your IBM Cloud access token might have expired.

You can find more troubleshooting instructions here

Vidyasagar Machupalli
  • 2,737
  • 1
  • 19
  • 29