Complete the command to upgrade the Kubernetes control plane to version 1.26.0.
kubectl [1] cluster-version --version=1.26.0
The kubectl upgrade command is used to upgrade the Kubernetes cluster version.
Complete the command to drain a node named 'worker-1' before upgrading.
kubectl drain [1] --ignore-daemonsets --delete-local-dataDraining the node named worker-1 safely evicts pods before upgrade.
Fix the error in the command to upgrade a node using kubeadm.
kubeadm upgrade node [1]The kubeadm upgrade node plan command shows the upgrade plan for the node.
Fill both blanks to create a command that cordons and drains a node named 'node-2'.
kubectl [1] node-2 && kubectl [2] node-2 --ignore-daemonsets --delete-local-data
First, cordon marks the node unschedulable. Then, drain evicts pods safely.
Fill all three blanks to create a dictionary comprehension that maps node names to their upgrade status if status is 'pending'.
upgrade_status = [1]: [2] for [3], status in nodes.items() if status == 'pending'}
This comprehension creates a dictionary with node names as keys and their status as values, filtering only 'pending' statuses.