Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube addon registry 中image digest错误导致无法拉取镜像 #66

Open
smartheye opened this issue Sep 23, 2021 · 3 comments
Open

Comments

@smartheye
Copy link

重现问题所需的命令
minikube addons enable registry

失败的命令的完整输出

Failed to pull image "registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1@sha256:d5459fcb27aecc752520df4b492b08358a1912fcdfa454f7d2101d4b09991daa": rpc error: code = Unknown desc = Error response from daemon: manifest for registry.cn-hangzhou.aliyuncs.com/google_containers/registry@sha256:d5459fcb27aecc752520df4b492b08358a1912fcdfa454f7d2101d4b09991daa not found: manifest unknown: manifest unknown
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1 2.7.1: Pulling from google_containers/registry 6a428f9f83b0: Pull complete 90cad49de35d: Pull complete b215d0b40846: Pull complete 429305b6c15c: Pull complete 6f7e10a4e907: Pull complete Digest: sha256:265d4a5ed8bf0df27d1107edb00b70e658ee9aa5acb3f37336c5a17db634481e Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1 registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1

minikube logs命令的输出

Sep 23 15:02:51 minikube kubelet[3081]: E0923 15:02:51.937514 3081 pod_workers.go:747] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"registry\" with ImagePullBackOff: \"Back-off pulling image \\\"registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1@sha256:d5459fcb27aecc752520df4b492b08358a1912fcdfa454f7d2101d4b09991daa\\\"\"" pod="kube-system/registry-8fxq4" podUID=612adaf0-19c8-488f-a240-9a69c4b14c08

使用的操作系统版本
MacOS 11.6

@CWL-1688
Copy link

你好,这个问题最后怎么解决的呢?

@CWL-1688
Copy link

找到对应的replication controller

kubectl get rc -n kube-system
编辑rc配置
kubectl edit rc -n kube-system registry
修改其中的image地址,将其改为registry:2.7.1
删除pod,等待自动重新创建

以上操作需要集群可以科学上网

@ruinshe
Copy link

ruinshe commented Nov 23, 2021

TL;DR using the command line below:

kubectl patch -n kube-system rc registry -p '{"spec":{"template":{"spec":{"containers":[{"name":"registry","image": "registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1"}]}}}}'
kubectl delete pod -n kube-system -l actual-registry=true

FYI, just a temporary fix, you can just edit the deploy and remove the digest after @sha256=, i.e. using registry.cn-hangzhou.aliyuncs.com/google_containers/registry:2.7.1 directly.

Not sure why the mirrored image on AliCloud is mismatched with the official one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants