gpt4 book ai didi

kubernetes - 如何将kubernetes 1.10.4更新到1.11

转载 作者:行者123 更新时间:2023-12-02 12:19:00 26 4
gpt4 key购买 nike

我正在使用Kubernetes集群版本1.10.4。我想将其更新为1.12,但是首先,我需要将其更新为1.11。

我阅读了以下常见问题解答:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-11/

但这没有用。步骤尝试立即更新到1.12,并以错误结尾。 :(

救命!

最佳答案

通过安装v.1.10.4版本并尝试使用https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-11/常见问题将其升级到v.1.11.0来重现您的问题。

相同的错误,并尝试升级到1.12.1而不是1.11.0

[upgrade/config] FATAL: invalid configuration: kind and apiVersion is mandatory information that needs to be specified in all YAML documents



发生这种情况是因为在使用以下命令时将v1.12.1传递给$ VERSION:
export VERSION=$(curl -sSL https://dl.k8s.io/release/stable.txt)

root@kube-update-11:~# echo $VERSION

v1.12.1



您应该手动设置正确的版本:
export VERSION=v1.11.0
export ARCH=amd64
curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > /usr/bin/kubeadm
chmod a+rx /usr/bin/kubeadm

然后再试一次
root@kube-update-11:~# kubeadm upgrade plan

[preflight] Running pre-flight checks.

[upgrade] Making sure the cluster is healthy:

[upgrade/config] Making sure the configuration is correct:

[upgrade/config] Reading configuration from the cluster...

[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'

I1022 12:07:11.188895 20089 feature_gate.go:230] feature gates: &{map[]}

[upgrade] Fetching available versions to upgrade to

[upgrade/versions] Cluster version: v1.10.4

[upgrade/versions] kubeadm version: v1.11.0

[upgrade/versions] Latest stable version: v1.12.1

[upgrade/versions] Latest version in the v1.10 series: v1.10.9


root@kube-update-11:~# kubeadm upgrade apply v1.11.0

[preflight] Running pre-flight checks.

[upgrade] Making sure the cluster is healthy:

[upgrade/config] Making sure the configuration is correct:

...

[upgrade/version] You have chosen to change the cluster version to "v1.11.0"

[upgrade/versions] Cluster version: v1.10.4

[upgrade/versions] kubeadm version: v1.11.0

...

[upgrade/successful] SUCCESS! Your cluster was upgraded to "v1.11.0". Enjoy!

[upgrade/kubelet] Now that your control plane is upgraded, please proceed with upgrading your kubelets if you haven't already done so.

关于kubernetes - 如何将kubernetes 1.10.4更新到1.11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52907999/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com