英文:
Change kubernetes default registry to registry.k8s.io
问题
我有一个使用kubeadm部署的k8s集群,当前版本为v1.21,使用docker作为容器运行时(CRI)。我想将它升级到v1.25,所以我正在阅读发布说明,我在这里的最后一段中看到了关于新的k8s注册表 registry.k8s.io
的信息,但我不知道如何检查我的当前注册表是什么,以及如何将默认注册表更改为新的注册表。
我找到了这个链接 关于这个更改,但我找不到答案。
英文:
I have a k8s cluster deployed with kubeadm and its current version is v1.21 and use docker as CRI
I want to upgrade it to v1.25, so I was reading the release notes, and I read about the new k8s registry, which is registry.k8s.io
in its release notes there in the last paragraph but I don't know how to check what my current registry is and how to change the default registry to the new one?
I found this link about this change, but I can't find my answers.
答案1
得分: 1
要检查当前的注册表,请运行以下命令:
kubeadm config images list
输出将显示图像列表,您可以在其中找到当前的注册表。
要将注册表更改为 registry.k8s.io
,您可以使用 kubeadm init 命令。
kubeadm init --image-repository=registry.k8s.io
在更改图像后重新启动集群,因为配置将被正确更新,然后运行 kubeadm upgrade v1.25
以更新您的集群。现在集群将会升级并使用新的注册表。
之后,您可以使用 kubeadm config images pull
命令从新注册表中拉取图像,还要确保更新任何现有的部署。
英文:
To check your current registry run the below command
kubeadm config images list
Output will be the images list where you can find the current registry.
To change the registry to registry.k8s.io
you can use the kubeadm init command.
Kubeadm init –image-repository= registry.k8s.io
Restart the cluster after changing the image as the configuration will be updated correctly,Then run kubeadm upgrade v1.25
to update your cluster.Now the clusters will be upgraded and will use the new registry.
After that you can use kubeadm config images pull
command to pull the images from the new registry, also make sure to update any existing deployments.
答案2
得分: 0
你可以通过检查您当前集群中的Kubernetes组件的图像来检查当前的注册表。这只是获取调度器等组件图像的来源。
但无需担心,您不会受到这种变化的影响。
英文:
You can check a current registry by checking images of Kubernetes components you have now in your cluster. That is just a source of from where to get images for components like scheduler etc.
But there is nothing to care about, you should not be affected by that change anyhow.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论