I’ve set up a private Docker registry (registry:2
) on Kubernetes (k3s). Initially, I configured it using HTTPS with authentication via an htpasswd
file, and this setup worked perfectly.
Now, I want to additionally allow access via registry.local:80
, accessible only on my local network (HTTP, no SSL). I have updated my Docker daemon configuration (~/.docker/daemon.json
) as follows to include insecure registries:
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"insecure-registries": [
"registry.local",
"registry.local:80"
]
}
With this configuration, running the following command:
$ docker login registry.local:80
prompts me for credentials and, after entering them, the command succeeds, When I check the logs of the registry I see the login attempt.
However, when I attempt to push an image:
$ docker push registry.local:80/hello-world:latest
it fails after some time with the following error
The push refers to repository [registry.local:80/hello-world]
08000c18d16d: Retrying in 1 second
unknown: 404 page not found
Despite the successful login, I am unable to push images over HTTP. There is also no logging created when I try to push, as if that call never reaches my registry. BTW, I’m on a Mac and my k3s cluster is linux (Raspberry pi’s)
Could anyone explain what might happen here?
UPDATE: I just got it working with a NodePort type service in k3s, so you directly push to the node-ip:port. But still no success when I do it with ingress/Traefik