1

所以我在我的局域网上有一个注册表,来自其他机器和主机 curl、nslookup、docker pull/run 和 podman pull/run,就像卷曲 v2 清单地址一样。从容器内卷曲地址https://docker.infrastructure.lan.mydomain/v2/my-image/manifests/latest也可以工作。那么k3s/containerd是怎么做dns查找的呢?我的猜测是,k3s 正在使用像 8.8.8.8 这样的互联网 DNS 而不是 coredns,相当于 docker pulls?我希望它使用我的(甚至 coredns)

无论如何,这里的错误是看到,域后缀已更改。

Pulling image "docker.infrastructure.lan.mydomain/my-image:latest"
  Warning  Failed     27m (x4 over 29m)     kubelet, infrastructure.lan.mydomain  Failed to pull image "docker.infrastructure.lan.mydomain/my-image:latest": rpc error: code = Unknown desc = failed to pull and unpack image "docker.infrastructure.lan.mydomain/my-image:latest": failed to resolve reference "docker.infrastructure.lan.mydomain/my-image:latest": failed to do request: Head https://docker.infrastructure.lan.mydomain/v2/my-image/manifests/latest: dial tcp: lookup docker.infrastructure.lan.mydomain: no such host

再次在容器内这很好(我可以卷曲 url),并且在主机上很好。从我网络上的其他非 k3s 机器上也可以。但是诸如kubectl run --image docker.infrastructure.lan.mydomain/my-image:latest testing给出上述错误之类的事情

4

0 回答 0