I'm following Kubernete's getting started guide. Everything went smoothly until I ran
$ gcloud docker push gcr.io/<PROJECT ID>/hello-node:v1
(Where is, well, my project id). For some reason, Kubernetes is not able to push to the registry. This is what I get:
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
The push refers to a repository [gcr.io/kubernetes-poc-1320/hello-node]
18465c0e312f: Preparing
5f70bf18a086: Preparing
9f7afc4ce40e: Preparing
828b3885b7b1: Preparing
5dce5ebb917f: Preparing
8befcf623ce4: Waiting
3d5a262d6929: Waiting
6eb35183d3b8: Waiting
denied: Unable to create the repository, please check that you have access to do so.
Any ideas on what I might be doing wrong? Note that I have run. $ gcloud init
, so I've logged in.
Thanks in advance!
run
gcloud init
and see whether you have logged in to the correct account. I once had this error because of i was trying to push image from different google accountIf you're using a GCE instance, you need to make sure it has the right Cloud API access scope. Since you can't edit the scopes on running instances, you can create a new instance using your current disk.
To do that, do the following
In https://stackoverflow.com/a/39996807/598513 I answered switching user/account
For me, having the same error, I found I missed the "gcloud" in the beginning. That was because previous 2 commands started with docker and I just glanced over the changes after docker.
correct:
This solved it in my case:
Short version:
Press
Enable billing
in theContainer Engine
screen in thehttps://console.cloud.google.com
.Long version:
In my case I got the error because of an issue with setting billing in the google cloud platform console.
Although I entered all my credit card information and the screen of my
Container Engine
Screen in the google cloud platform console saidContainer Engine is getting ready. This may take a minute or more.
, it didn't work before I pressedEnable billing
on the same screen. Then thegcloud docker push
command finally worked.Oddly enough after later returning to the
Container Engine
screen, it shows meContainer Engine is getting ready. This may take a minute or more.
and the buttonEnable billing
again.. must be a bug in the console.What do you use as a project id? It shouldn't be "my-kubernetes-codelab", it should be "my-kubernetes-codelab-234231" or whatever your numbered version is. This was my problem.