Skip to content

Commit

Permalink
Fix bugs about kubeadm upgrading. (#12809)
Browse files Browse the repository at this point in the history
* Fix bug about kubeadm upgrading

It will lead to the following error if using `yum upgrade -y kubeadm --disableexcludes=kubernetes` command:
<https://serverfault.com/questions/943696/fatal-unexpected-error-when-reading-kubeadm-config-configmap-clusterconfigurat>
Running `yum upgrade -y kubeadm --disableexcludes=kubernetes` command will upgrade the kubeadm to v1.13 but kubeadm v1.13 could not upgrade the v1.12 kubeadm cluster.

* Update kubeadm-upgrade-1-12.md

* Update kubeadm-upgrade-1-12.md

* Update kubeadm-upgrade-1-12.md
  • Loading branch information
Mr-Linus authored and k8s-ci-robot committed Feb 25, 2019
1 parent 252f4d5 commit 924d764
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ This page explains how to upgrade a Kubernetes cluster created with `kubeadm` fr

{{< tabs name="k8s_install" >}}
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
# replace "x" with the latest patch version
apt-mark unhold kubeadm && \
apt-get update && apt-get upgrade -y kubeadm && \
apt-get update && apt-get upgrade -y kubeadm=1.12.x-00 && \
apt-mark hold kubeadm
{{% /tab %}}
{{% tab name="CentOS, RHEL or Fedora" %}}
yum upgrade -y kubeadm --disableexcludes=kubernetes
# replace "x" with the latest patch version
yum upgrade -y kubeadm-1.12.x --disableexcludes=kubernetes
{{% /tab %}}
{{< /tabs >}}

Expand Down Expand Up @@ -230,11 +232,13 @@ This page explains how to upgrade a Kubernetes cluster created with `kubeadm` fr
{{< tabs name="k8s_upgrade" >}}
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
# replace "x" with the latest patch version
apt-get update
apt-get upgrade -y kubelet kubeadm
apt-get upgrade -y kubelet=1.12.x-00 kubeadm=1.12.x-00
{{% /tab %}}
{{% tab name="CentOS, RHEL or Fedora" %}}
yum upgrade -y kubelet kubeadm --disableexcludes=kubernetes
# replace "x" with the latest patch version
yum upgrade -y kubelet-1.12.x kubeadm-1.12.x --disableexcludes=kubernetes
{{% /tab %}}
{{< /tabs >}}
Expand Down

0 comments on commit 924d764

Please sign in to comment.