Open matthewmichihara opened 4 years ago
The meat of the error is:
unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Just to test that Docker is in-fact configured properly, can you share the output of:
docker pull gcr.io/chelseamarket/p/java-hello-world
$ docker pull gcr.io/chelseamarket/p/java-hello-world
Using default tag: latest
latest: Pulling from chelseamarket/p/java-hello-world
24f0c933cbef: Already exists
69e2f037cdb3: Already exists
3e010093287c: Already exists
aebd67d1ef6f: Already exists
d97439fb32b3: Already exists
a0e31a817843: Already exists
5b40285b7db8: Already exists
Digest: sha256:446df95cdad401e4aadf5ccc137648a725ba8d7f25aa0a2b26017f4f262f1997
Status: Downloaded newer image for gcr.io/chelseamarket/p/java-hello-world:latest
gcr.io/chelseamarket/p/java-hello-world:latest
That worked. Had a discussion with @briandealwis about this and the issue seems to be that I don't have ImagePullSecrets
configured for this D4D cluster (https://blog.container-solutions.com/using-google-container-registry-with-kubernetes) so this is probably not a Skaffold bug, but I thought I'd keep this issue open for discussion. Feel free to close if you think there's nothing to be done here.
Yeah, this is not a Skaffold bug. I wonder what Skaffold could do better though. @matthewmichihara any idea?
Haven't really thought this through but could Skaffold set up this ImagePullSecret
for me? Or would you say that is not Skaffold's responsibility
I'm not sure if Skaffold is the right place for it, but it does feel like there should be a tool for creating the secret and patching the service account.
.I've marked this issue with help wanted
. This is not a high-priority issue for the Skaffold team as GKE clusters are already setup to pull images from GCR and Artifact Registry repositories within the same project, and Minikube's gcp-auth
addon supports rewriting pods on the fly with GCR+AR pull secrets.
If you are interested in contributing, please create a design proposal for discussion.
I should note some complications to creating a solution.
imagePullSecrets
to pods can be somewhat difficult.
I'm trying to build a container on GCB, and then deploy it on my local Docker for Desktop Kubernetes cluster, but I seem to be hitting auth issues. The container builds fine, but the Kubernetes pod gets stuck in an error state. I went through https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud-helper and set
gcloud
as the credential helper viagcloud auth configure-docker
, but the problem still seems to persist.Using this example: https://github.com/GoogleCloudPlatform/cloud-code-samples/tree/master/java/java-hello-world