Skip to content

Latest commit

 

History

History
executable file
·
129 lines (85 loc) · 2.11 KB

File metadata and controls

executable file
·
129 lines (85 loc) · 2.11 KB

Lab - Cluster Upgrade Process

  • Take me to the Lab

Solutions to practice test cluster upgrade process.

  • What is the current version of the cluster?

    Details
    $ kubectl get nodes
    
  • How many nodes are part of this cluster?

    Details
    $ kubctl get nodes
    
  • Check what nodes the pods are hosted on.

    Details
    $ kubectl get pods -o wide
    
  • Count the number of deployments

    Details
    $ kubectl get deploy
    
  • Run the command kubectl get pods -o wide

    Details
    $ kubectl get pods -o wide
    
  • You are tasked to upgrade the cluster. User's accessing the applications must not be impacted. And you cannot provision new VMs. What strategy would you use to upgrade the cluster?

    Details
    Upgrade one node at a time while moving the workloads to the other
    
  • Run the kubeadm upgrade plan command

    Details
    $ kubeadm upgrade plan
    
  • Run the kubectl drain master --ignore-daemonsets

    Details
    $ kubectl drain master --ignore-daemonsets
    
  • Run the command apt install kubeadm=1.18.0-00 and then kubeadm upgrade apply v1.18.0 and then apt install kubelet=1.18.0-00 to upgrade the kubelet on the master node

    Details
    $ apt install kubeadm=1.18.0-00
    $ kubeadm upgrade apply v1.18.0
    $ apt install kubelet=1.18.0-00
    
  • Run the command kubectl uncordon master

    Details
    $ kubectl uncordon master
    
  • Run the command kubectl drain node01 --ignore-daemonsets

    Details
    $ kubectl drain node01 --ignore-daemonsets
    
  • Run the commands: apt install kubeadm=1.18.0-00 and then kubeadm upgrade node. Finally, run apt install kubelet=1.18.0-00.

    Details
    $ apt install kubeadm=1.18.0-00
    $ kubeadm upgrade node
    $ apt install kubelet=1.18.0-00
    
  • Run the command kubectl uncordon node01

    Details
    $ kubectl uncordon node01