среда, 19 июня 2019 г.

Upgrade Kubernetes Cluster


How to upgrade a Kubernetes Cluster?
View the version of the server and client on the master node:
kubectl version --short

View the version of the scheduler and controller manager:
kubectl get pods -n kube-system kube-controller-manager-chadcrowell1c.mylabserver.com -o yaml |grep image

View the name of the kube-controller pod:
kubectl get pods -n kube-system

Set the VERSION variable to the latest stable release of Kubernetes:
export VERSION=v1.14.1

Set the ARCH variable to the amd64 system:
export ARCH=amd64

View the latest stable version of Kubernetes using the variable:
echo $VERSION

Curl the latest stable version of Kubernetes:
curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > kubeadm

Install the latest version of kubeadm:
sudo install -o root -g root -m 0755 ./kubeadm /usr/bin/kubeadm

Check the version of kubeadm:
sudo kubeadm version

Plan the upgrade:
sudo kubeadm upgrade plan

Apply the upgrade to 1.14.1:
kubeadm upgrade apply v1.14.1

View the differences between the old and new manifests:
diff kube-controller-manager.yaml /etc/kubernetes/manifests/kube-controller-manager.yaml

Curl the latest version of kubelet:
curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubelet > kubelet

Install the latest version of kubelet:
sudo install -o root -g root -m 0755 ./kubelet /usr/bin/kubelet

Restart the kubelet service:
sudo systemctl restart kubelet.service

Watch the nodes as they change version:
kubectl get nodes -w

Комментариев нет:

Отправить комментарий