我正在按照本指南 here 在 K3S 安装中安装 Rancher。当我运行以下命令时
helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.mydomainhere.com
我可以看到这部署了 2 个 rancher pod 和一个 rancher-webhook pod,但是第三个 rancher pod 无法安装并出现不同的错误:
Failed to pull image "rancher/rancher:v2.5.5": rpc error: code = FailedPrecondition
desc = failed to pull and unpack image "docker.io/rancher/rancher:v2.5.5":
failed commit on ref "layer-sha256:d8a8a5ffce76595d596b6177d992a1c602ef017c51716aac41a132eacd31c725":
unexpected commit digest sha256:179766804121211915209ddc992a80eba373be27858c1d67c1de65a7db05845d,
expected sha256:d8a8a5ffce76595d596b6177d992a1c602ef017c51716aac41a132eacd31c725: failed precondition
Failed to pull image "rancher/rancher:v2.5.5" unexpected commit digest sha256
或
rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/rancher/rancher:v2.5.5":
failed to copy: httpReaderSeeker: failed open: failed to do request:
Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/e0/e02481bb39c88f0352ed7ae1998f2860a4816a8d5c3ba3b397b972849f657e2e/data?verify=1613998137-u6Ymb9X6kgFrZFmuDAS2bRlVKjc%3D":
dial tcp: lookup production.cloudflare.docker.com: no such host
监控部署显示它已超时。
Waiting for deployment "rancher" rollout to finish: 0 of 3 updated replicas are available...
Waiting for deployment "rancher" rollout to finish: 1 of 3 updated replicas are available...
Waiting for deployment "rancher" rollout to finish: 2 of 3 updated replicas are available...
Waiting for deployment spec update to be observed...
Waiting for deployment "rancher" rollout to finish: 2 of 3 updated replicas are available...
error: deployment "rancher" exceeded its progress deadline
出了什么问题,我该如何解决?
编辑,因为我找到了一种让它“工作”的方法,尽管我不确定问题是什么。我通过在 Linux(kubernetes 服务器的 VM 主机之一)而不是在 Windows(我的开发机器)上运行相同的命令行来实现这一点。这是使用具有相同 kube.config 的相同版本的 kubectl 和 helm。该命令在 Linux 上运行时有效,在 Windows 上运行时失败。