-
Notifications
You must be signed in to change notification settings - Fork 815
Description
Hi,
I'm trying to change microk8s to use an internal mirror of docker hub to pull all images through, but it does not seem to apply the changes in the configuration I have made.
I am using a Sonatype/Nexus3 docker proxy to cache images we are using, and need to get microk8s to pull images from there instead of going direct to the https://registry-1.docker.io url
To do this I have modified the file at /var/snap/microk8s/current/args/containerd-template.toml and have changed this entry:
[plugins.cri.registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
to
[plugins.cri.registry.mirrors."docker.io"]
endpoint = ["https://my-mirror.xxxxxxxx.com"]
I have then stopped and started the microk8s service (and can see the changes reflected in /var/snap/microk8s/current/args/containerd.toml
However, when I deploy Istio with the microk8s.enable istio command, and then look at the pods, I can see messages such as:
Failed to pull image "docker.io/istio/citadel/manifests/1.3.4": rpc error: code = Unknown desc = failed to resolve image "docker.io/istio/citadel/manifests/1.3.4": no available registry endpoint: failed to do request: Head "https://registry-1.docker.io/v2/istio/citadel/manifests/1.3.4" dial txp x.x.x.x:443: connect: connection refused
(I have blocked the docker.io on our infrastructure to make sure it was using the proxy)
However...
On the same box with docker I have this config in the daemon.json file:
{
"registry-mirrors":["https://my-mirror.xxxxxxxx.com"]
}
If I run the command:
docker pull istio/citadel:1.3.4
It is able to use my mirror without any issue.
Is there anything I am missing when it comes to telling microk8s where to look for docker.io based images?
Please run microk8s inspect and attach the generated tarball to this issue.
inspection-report-20200828_124323.tar.gz