Skip to content

Latest commit

 

History

History
111 lines (72 loc) · 2.33 KB

cluster_maint.md

File metadata and controls

111 lines (72 loc) · 2.33 KB

Cluster Maintenance (11%)

kubernetes.io > Documentation > Reference > kubectl CLI > kubectl Cheat Sheet

kubernetes.io > Documentation > Tasks > Monitoring, Logging, and Debugging > Get a Shell to a Running Container

kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Configure Access to Multiple Clusters

kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Accessing Clusters using API

kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Use Port Forwarding to Access Applications in a Cluster

Drain a node for maintenance named node1.mylabserver.com

show

kubectl drain node1.mylabserver.com --ignore-daemonsets --force

Put the node node1.mylabserver.com back into service, so pods can be scheduled to it

show

kubectl uncordon node1.mylabserver.com

Updgrade kubeadm to version 1.18.6

show

sudo apt install -y kubeadm --allow-change-held-packages kubeadm=1.18.6-00

Plan and upgrade the control plane components with kubeadm to version 1.18.6

show

sudo kubeadm upgrade plan

sudo kubeadm upgrade apply v1.18.6

Update kubelet to version 1.18.6

show

sudo apt install kubelet=1.18.6-00

Update kubectl to version 1.18.6

show

sudo apt install kubectl=1.18.6-00

Restart kubelet on the node

show

sudo systemctl daemon-reload

sudo systemctl restart kubelet

Upgrade the kubelet configuration on a worker node

show

sudo kubeadm upgrade node