Skip to main content

Upgrading Kubernetes

Pod Eviction Timeout - Number of minutes the controller will wait before it marks a pod as dead. Default is 5 minutes! If a node goes down, that’s how long before the pod will be marked a a failure.

Upgrades: Upgrade master, then worker nodes.

Drain & Uncordon a node to do upgrades:

kubectl drain node-1 kubectl uncordon node-1 kubectl cordon node-1 (marks as unscheduled, but does not terminate)

ETCd and CoreDNS have their own versions.

Components can be at different release versions.

No component should be higher than kube-apiserver (version: X) controller-manager and kube-server can be at vX-1 kubelet and kube-proxy can run vX-2

kubectl can be +/- 1 version difference

Kubectl only supports 3 recent editions (.11, .12, .13)

Recommend upgrading one minor version at a time. Can’t go from .11 -> .13 without stopping at .12

kubeadm has a plan for upgrading clusters.

k8s the hard way gets the manually upgrade!

Master can go down without impacting worker nodes.

If a pod were to fail, a new one will not be regenerated during master downtime. Upgrading nodes, you can add a new node, and remove an old one.

kubadm upgrade plan

You must also upgrade the kubeadm tool.

apt-get upgrade -y kubelet=1.12.0-00

Node upgrade:

kubectl drain node-1
apt-get upgrade -y kubeadm=1.12.0-00
apt-get upgrade -y kubelet=1.12.0-00
kubeadm upgrade node config —kubelet-version v1.12.0
systemctl restart kubelet
kubectl uncordon node-1

todo! Learn more about kubeadm upgrade