0

I am failing to pull images from a private gcr repo through helm jenkins on a private k8s repo. I am getting:

rpc error: code = Unknown desc = Error response from daemon: 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.

Is there anyway I can mitigate this error without specifically specifying credentials on pipeline level?

Pulling image from host work and creating a deployment in K8s is pulling successfully, but when pulled within Jenkins it doesn't work.

1 Answer 1

1

Found the issue, had:

kubectl -n jenkins patch serviceaccount jenkins -p '{"imagePullSecrets": [{"name": "gcr-json-key"}]}' 

... applied on default serviceaccount instead of jenkins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.