k3s/k3d authenticate to secure registry 401 UNAUTHORIZED #3830
-
./k3d version Hi there, I am trying to configure my k3d cluster to pull images from a secure registry. I am running the command in the following way:
my registries.yaml is as follows
without the ca file I get x509 certificate signed by unknown authority, so I assume that my registries.yaml is being used in some way. However, there seems to be no combination of ca_file cert_file and key_file that get me past the When i copy my.pem to /etc/docker/certs.d/my.registry.org/ as client.key and client.cert, I am able to docker pull as expected without logging in. however specifying these in the configs section and mounting them does not seem to enable k3s to pull images from the secure part. Where am i going wrong? Can anyone help me configure this correctly? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 20 replies
-
Your registry appears to require authentication, but you're not providing any? Did you want to provide a username and password, or cert_file and key_file for certificate auth? |
Beta Was this translation helpful? Give feedback.
-
According to your question over at k3d-io/k3d#705, it looks like you're trying to use the same file for all three attributes: Try to open your |
Beta Was this translation helpful? Give feedback.
-
Not sure which of my many changes fixed the issue, but i got it working with the certs. These are some differences: I switched to using the --config flag and specified all of my volumes and ports in that config file Thanks for the responses |
Beta Was this translation helpful? Give feedback.
Not sure which of my many changes fixed the issue, but i got it working with the certs. These are some differences:
I switched to using the --config flag and specified all of my volumes and ports in that config file
My mounts previously had nodeFilter
server[0]
where I now haveserver[*]
andagent[*]
(configured for 1 server no agents)The loadbalancer is currently disabled and wasnt previously
traefik is also disabled and wasnt previously
I have mounted my hosts /etc/resolv.conf onto /etc/resolv.conf in k3d
No longer mounting a "registries.yaml" just specified in the config file
Thanks for the responses