Unable to use K3d local registry in Pod spec #1093
-
Question / Where do you need Help?K3d local registry, created by K3d Scope of your Question
However I ran this with image rancher/k3s:v1.22.10-k3s1. Here is my k3d.yaml I pass at creation time:
I am trying to use K3d with skaffold so that I can change worker node configurations and use Traefik. I have this problem even when skaffold is not used and I just use I see that the K3d local registry is insecure and using HTTP. I hope that's not an issue but this is the error I get:
It fails if I use k3d-registry.localhost/containername or if I use k3d-registry/containername in the pod spec. I have checked CoreDNS and its ConfigMap shows the registry:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @witchbutter , thanks for opening this issue! You're actually missing out the port there in the pod spec: |
Beta Was this translation helpful? Give feedback.
-
I did some more experimentation. As it turns out no matter what local port I set, in this case 5005, the port used inside the kubernetes cluster is 5000. So even thought my skaffold.yaml says:
The port exposed to docker on the laptop is 5005, but the kubernetes internal port is 5000. Also it seems that using the 'latest' tag in the deployment yaml doesn't work because I had to run |
Beta Was this translation helpful? Give feedback.
I did some more experimentation. As it turns out no matter what local port I set, in this case 5005, the port used inside the kubernetes cluster is 5000. So even thought my skaffold.yaml says:
The port exposed to docker on the laptop is 5005, but the kubernetes internal port is 5000.
Also it seems that using the 'latest' tag in the deployment yaml doesn't work because I had to run
skaffold run --tail --tag latest
in order to get the deployment to start.