0
votes

I am trying to test google cloud kubernetes. I created a cluster (all default setting) and pushed my docker image to gc image registry. When in workload I try to deploy the image, it gives me this error:

Pod errors: ImagePullBackOff

I tried to search around but all of the problems are related to when you have your docker registry outside google/kubernetes.

Any idea?

1
Can you give more details? Full logs, description how you pushing etc. ImagePullBackOff is a too general error. - Anton Kostenko
So basically, I pushed an image to google's private repository following their guide. Then setup a cluster. Tried to deploy in workload and their UI, they could see my image! I selected it and pressed deploy! Then it tells me that it cannot pull the image! Nothing more! ps: I am using their UI - Dijam
I more or less understood what you did, but unfortunately I cannot help you without logs. At least result of kubectl describe pod $pod_name result. There are no any general problems with UI interface and it's working for me. - Anton Kostenko
OK, I ran the command and I got this error: Error from server (Forbidden): pods "cluster-1" is forbidden: User "client" cannot get pods in the namespace "default": Unknown user "client" - Dijam
That means you are not connected to the cluster. Run this command first: $ gcloud container clusters get-credentials cluster-1 --zone ZONE --project PROJECT - suren

1 Answers

0
votes

Tnx for the guides. I found the solution for my problem. It was all about correct permissions for different services. As I messed up (deleted/updated) my services permissions, it failed even to create cluster. I created a new project and compared permissions created there with my current one and found out the missing permissions.

These are the required permissions in order to make a cluster and deploy an image to it:

service-{projectID}@containerregistry.iam.gserviceaccount.com -> Editor

service-{projectID}@container-engine-robot.iam.gserviceaccount.com -> Editor

{projectID}@cloudservices.gserviceaccount.com -> Editor

{projectID}[email protected] -> Editor