k3d authenticate to secure registry 401 UNAUTHORIZED #705
Replies: 2 comments 1 reply
-
Does your |
Beta Was this translation helpful? Give feedback.
-
Hi @the-scott-hand , thanks for starting this discussion! Just reading through your thread over in the k3s repo (where I think this fits better, since k3d doesn't have anything todo with containerd, etc. but rather just puts the files in the correct places, while even that you do manually here using the I'll see if I can find any help for you, but anyway, let's close this discussion here and follow-up over here |
Beta Was this translation helpful? Give feedback.
-
./k3d version
k3d version v4.4.6
k3s version v1.21.1-k3s (default)
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:
k3d cluster create --servers 1 mycluster -p "8069:80@loadbalancer" --volume $K3D_PATH/registries.yaml:/etc/rancher/k3s/registries.yaml --volume $K3D_PATH/my.pem:/etc/ssl/certs/my.pem
my registries.yaml is as follows
there seems to be no combination of ca_file cert_file and key_file that get me past the failed to pull and unpack image failed to resolve reference: "failed to authorize: failed to fetch anonymous token: unexpected status: 401 UNAUTHORIZED.
I am using a secure registry and authenticate using registered server certs rather than a username/password situation. When using docker, copying and pasting my cert into files client.key and client.cert and placing them in /etc/docker/certs.d/my.registry.org/ is enough to get docker to pull from the secure registry. How can I configure my registries.yaml to accomplish this in k3d? I have experimented with using cert_file and key_file in the registries.yaml with this pem (containing cert and key) but I get the same error.
Where am i going wrong? Can anyone help me configure this correctly?
Beta Was this translation helpful? Give feedback.
All reactions