From d4c21e8764146ca0ee3207429f479f9f36102a1b Mon Sep 17 00:00:00 2001 From: Jacob Beacham Date: Tue, 6 Jun 2017 02:31:27 -0700 Subject: [PATCH] Initial draft of upgrade guide for kubeadm clusters. In-place upgrades are supported between 1.6 and 1.7 releases. Rollback instructions to come in a separate commit. Fixes https://github.com/kubernetes/kubeadm/issues/278 --- _data/tasks.yml | 1 + .../independent/create-cluster-kubeadm.md | 5 ++ .../administer-cluster/kubeadm-upgrade-1-7.md | 83 +++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 docs/tasks/administer-cluster/kubeadm-upgrade-1-7.md diff --git a/_data/tasks.yml b/_data/tasks.yml index 5d580660a334d..a9e667316fd68 100644 --- a/_data/tasks.yml +++ b/_data/tasks.yml @@ -114,6 +114,7 @@ toc: - docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods.md - docs/tasks/administer-cluster/cluster-management.md - docs/tasks/administer-cluster/upgrade-1-6.md + - docs/tasks/administer-cluster/kubeadm-upgrade-1-7.md - docs/tasks/administer-cluster/namespaces.md - docs/tasks/administer-cluster/namespaces-walkthrough.md - docs/tasks/administer-cluster/dns-horizontal-autoscaling.md diff --git a/docs/setup/independent/create-cluster-kubeadm.md b/docs/setup/independent/create-cluster-kubeadm.md index 46727f182d01a..098e50b5691b2 100644 --- a/docs/setup/independent/create-cluster-kubeadm.md +++ b/docs/setup/independent/create-cluster-kubeadm.md @@ -390,6 +390,11 @@ kubeadm reset If you wish to start over simply run `kubeadm init` or `kubeadm join` with the appropriate arguments. +## Upgrading + +Instructions for upgrading kubeadm clusters can be found +[here](/docs/tasks/administer-cluster/kubeadm-upgrade-1-7/). + ## Explore other add-ons See the [list of add-ons](/docs/concepts/cluster-administration/addons/) to explore other add-ons, diff --git a/docs/tasks/administer-cluster/kubeadm-upgrade-1-7.md b/docs/tasks/administer-cluster/kubeadm-upgrade-1-7.md new file mode 100644 index 0000000000000..38a1d7a98f8ab --- /dev/null +++ b/docs/tasks/administer-cluster/kubeadm-upgrade-1-7.md @@ -0,0 +1,83 @@ +--- +assignees: +- pipejakob +title: Upgrading kubeadm clusters from 1.6 to 1.7 +redirect_from: +- "/docs/admin/kubeadm-upgrade-1-7/" +- "/docs/admin/kubeadm-upgrade-1-7.html" +--- + +* TOC +{:toc} + +This guide is for upgrading kubeadm clusters from version 1.6.x to 1.7.x. +Upgrades are not supported for clusters lower than 1.6, which is when kubeadm +became Beta. + +**WARNING**: These instructions will **overwrite** all of the resources managed +by kubeadm (static pod manifest files, service accounts and RBAC rules in the +`kube-system` namespace, etc.), so any customizations you may have made to these +resources after cluster setup will need to be reapplied after the upgrade. The +upgrade will not disturb other static pod manifest files or objects outside the +`kube-system` namespace. + +### On the master + +1. Upgrade system packages. + + Upgrade your OS packages for kubectl, kubeadm, kubelet, and kubernetes-cni. + + a. On Debian, this can be accomplished with: + + sudo apt-get update + sudo apt-get upgrade + + b. On CentOS/Fedora, you would instead run: + + sudo yum update + +2. Restart kubelet. + + sudo systemctl restart kubelet + +3. Delete the `kube-proxy` DaemonSet. + + Although most components are automatically upgraded by the next step, + `kube-proxy` currently needs to be manually deleted so it can be recreated at + the correct version: + + sudo KUBECONFIG=/etc/kubernetes/admin.conf kubectl delete daemonset kube-proxy -n kube-system + +4. Perform kubeadm upgrade. + + sudo kubeadm init --skip-preflight-checks --kubernetes-version + + For instance, if you want to upgrade to `1.7.0`, you would run: + + sudo kubeadm init --skip-preflight-checks --kubernetes-version v1.7.0 + +5. Upgrade CNI provider. + + Your CNI provider might have its own upgrade instructions to follow now. + Check the [addons](/docs/concepts/cluster-administration/addons/) page to + find your CNI provider and see if there are additional upgrade steps + necessary. + +### On each node + +1. Upgrade system packages. + + Upgrade your OS packages for kubectl, kubeadm, kubelet, and kubernetes-cni. + + a. On Debian, this can be accomplished with: + + sudo apt-get update + sudo apt-get upgrade + + b. On CentOS/Fedora, you would instead run: + + sudo yum update + +2. Restart kubelet. + + sudo systemctl restart kubelet