I'm running Microk8s on an EC2 instance. I fail to pull containers from our private registry. When trying to run such a container kubectl describe pod
shows:
Failed to pull image "docker.xxx.com/import:v1": rpc error: code = Unknown desc = failed to resolve image "docker.xxx.com/import:v1": no available registry endpoint: failed to fetch anonymous token: unexpected status: 401 Unauthorized
I can docker login
and docker pull
from that machine. The yaml I used to deploy the container is working fine on another (non containerd) cluster. It refers to a pull secret, which is identical to the one used in the other cluster and working fine there.
I added the following entry to the containerd-template.toml of Microk8s:
[plugins.cri.registry]
[plugins.cri.registry.mirrors]
...
[plugins.cri.registry.mirrors."docker.xxx.com"]
endpoint = ["https://docker.xxx.com"]
I have no idea what else I might be missing.