-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulling images from private repo using imagePullSecrets does not work #817
Comments
This is a Kubernetes feature not specific to kind.
|
Private registries are known to generally work with kind and we actually have our own docs with more options https://kind.sigs.k8s.io/docs/user/private-registries/ |
I just tested this with a private registry in quay.io. Kind version: v0.5.1 The image quay.io/o0o/nginx:stable is private. I can verify that by execing into the kind node and do a crictl pull:
Now I create a secret associated with a robot account on quay.io that has read access to the image. example secret:
The content of dockerconfigjson is encoded base64.
The encoded auth line is:
With that config I can pull my image:
Logs from the pod on deployment:
|
After testing out the above and successfully pull a private image from quay.io I can only conclude that it's has something todo with my private repository. Using the below command inside the running kind-control-plane container leads to the same error:
Thanks for the help and time!!! |
For anyone who comes across this, I had the same issue and it drove me crazy. Here is the problem: so Here are the bugs: |
In the end my issue was related to the auth layer on top of the registry I was using. It was fixed with this PR: cesanta/docker_auth#265 |
this came up again, reached out to the wonderful @rimusz for follow up 🙏 |
I've contacted Jfrog support and they answered that it should be fixed by now
|
yes, it looks that way as I wasn't able to reproduce it |
Hello there
apiVersion: v1
kind: Pod
metadata:
name: "myPodName"
namespace: "mynamespace" --> IMPORTANT
spec:
containers:
- name: myPodName
image: my.pod.image/path:tag
imagePullSecrets:
- name: mysecretname
restartPolicy: Never
|
Thanks @thynquest that's a good reminder. Perhaps we should add a short note to the guide. I think it's in the linked kubernetes docs but there's a lot there 😅 |
yes @BenTheElder I think we should; it is a good idea..I am not sure that I will be the last to fall for that issue |
I know this is a closed issue and I apologize profusely for posting on here (happy to move it somewhere else!), but this is the only reference to the I'm not using I've summarized the issue and what I've done here: https://stackoverflow.com/questions/73422592/kubernetes-imagepullbackoff-with-private-registry-on-docker-hub I've also verified that the secret(s) I'm using are in the same namespace as the pod (that is, Again, apologies for bringing this back up but I'm not sure what else to do at this point. Thank you. |
For some reason, this just magically started working yesterday without any changes whatsoever. Just in case anyone's looking at this. |
What happened:
I have an image that needs to be pulled from a private repository. Before deploying my app I created a (correctly formatted) secret containing a
.dockerconfigjson
key with my registry credentials in json as it's value. In my deployment I point to the secret usingspec.template.spec.containers.imagePullSecrets
. I have also tried it by adding a default imagePullSecret to my service account without success.I get the fallowing events when I use
describe pod
:(Note that the same deployment works fine on my production Kubernetes cluster.)
What you expected to happen:
That it pulls the image from my private repository.
How to reproduce it (as minimally and precisely as possible):
Have an image in a private repository that requires authentication. And try and use that image. See this how-to for setting up the image pull secret.
Anything else we need to know?:
I tried kind
v0.5.1
with the fallowing node image version:kindest/node:v1.15.3@sha256:27e388752544890482a86b90d8ac50fcfa63a2e8656a96ec5337b902ec8e5157
kindest/node:v1.13.10@sha256:2f5f882a6d0527a2284d29042f3a6a07402e1699d792d0d5a9b9a48ef155fa2a
I also tried it with kind
v0.4.0
withkindest/node:v1.13.7@sha256:f3f1cfc2318d1eb88d91253a9c5fa45f6e9121b6b1e65aea6c7ef59f1549aaaf
.All the above with golang version
v1.12.9
.Environment:
kind version
): Bothv0.5.1
andv0.4.0
kubectl version
):1.15.3
,1.13.10
and1.13.7
docker info
):19.03.1
/etc/os-release
): MacOS10.14.6
The text was updated successfully, but these errors were encountered: