Anant Mishra
Anant Mishra

Reputation: 1

minikube running on google cloud shell is unable to pull image from artifact registry - denied: Unauthenticated request

I am running minikube on google cloud shell. When I deploy my app using a command kubectl apply -k k8/config/app/app-name, the deployment is unable to pull image from artifact registry. This is the error I receive:

Failed to pull image "europe-docker.pkg.dev/sample-dev-xxxxxx/github-cr/org-name/app:v0.0.46": Error response from daemon: Head "https://europe-docker.pkg.dev/v2/sample-dev-xxxxxx/github-cr/org-name/app/manifests/v0.0.46": denied: Unauthenticated request. Unauthenticated requests do not have permission "artifactregistry.repositories.downloadArtifacts" on resource "projects/sample-dev-xxxxxx/locations/europe/repositories/github-cr" (or it may not exist)

Please note the following:

Could someone please help me figure out what am I missing as the minikube is unable to pull the image from the artifact registry?

I tried to run the minikube in google cloud shell and expected no errors as the same configuration deployed the app to GKE successfully.

Upvotes: 0

Views: 274

Answers (1)

Anant Mishra
Anant Mishra

Reputation: 1

Thanks to the team at minikube who helped me resolve the issue. The curious lots may follow the conversation here.

It's the gcp-auth addon that did the trick. Here are the steps to resolve the issue:

  • Use the command gcloud auth application-default login to generate the ADC.
  • Copy across the ADC content at the default location ~/.config/gcloud.
  • Enable the addon by running the command minikube addons enable gcp-auth --force.

Upvotes: 0

Related Questions