complete solution Newest RATED A+ 2025/2026 NEW!!
Set configuration context:
Il` Il`
[student@node-1]$ kubectl config use-context-mk8s Il` Il` Il`
Task:
Given an existing Kubernetes cluster running version 1.18.8, upgrade all of the Kubernetes control
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
plan and node components on the master node only to version 1.19.0.
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
You are also expected to upgrade kubelet and kubectl on the master node.
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
Be sure to drain the master node before upgrading it an uncordon it after the upgrade. Do not
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
upgrade the worker nodes, etcd, the container manager, the CNI plugin, the DNS service or any
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
other addons.
Il` Il`
--------------------------------------------------------
A.) Il`
kubectl drain <node-to-drain> --ignore-daemonsets
Il` Il` Il`
root@controlplane:~# apt update Il` Il`
apt-get update && \ Il` Il` Il`
apt-get install -y --allow-change-held-packages kubeadm=1.22.x-00
Il` Il` Il` Il`
kubeadm version Il`
kubeadm upgrade plan Il` Il`
kubeadm upgrade apply v1.20.0 Il` Il` Il`
apt-get update && \ Il` Il` Il`
apt-get install -y --allow-change-held-packages kubelet=1.22.x-00 kubectl=1.22.x-00
Il` Il` Il` Il` Il`
B.) Il`
sudosystemctl daemon-reload Il`
sudosystemctl restart kubelet Il` Il`
,kubectluncordon<node-to-drain>
C. Il`
sudosystemctl system-reload Il`
sudosystemctl uplooad-kubelet Il`
kubectluncordon<note-to-drain>
B
Set configuration context:
Il` Il`
[student@node-1]$ kubectl config use-context k8s Il` Il` Il` Il`
Task:
From the pod label name=cpu-user, find pods running high CPU workloads and write the name of
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
the pod consuming most CPU to the file /opt/KUTR00401/KUTR00401.txt (which already exists).
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
--------------------------------------------------------
A.)
kubectl top -l name=cpu-utilizer –A echo 'pod name' >>/opt/KUT00401/KUT00401.txt
Il` Il` Il` Il` Il` Il` Il` Il`
kubectl top pod --sort-by='cpu' --no-headers | head -1
Il` Il` Il` Il` Il` Il` Il`
or
kubectl top pods -l name=name-cpu-loader --sort-by=cpu
Il` Il` Il` Il` Il`
echo ‘top pod name' >>/opt/KUTR00401/KUTR00401.txt
Il` Il` Il` Il`
or
kubectl top node --sort-by='cpu' --no-headers | head -1
Il` Il` Il` Il` Il` Il` Il`
kubectl top pod --sort-by='memory' --no-headers | head -1
Il` Il` Il` Il` Il` Il` Il`
kubectl top pod --sort-by='cpu' --no-headers | tail -1
Il` Il` Il` Il` Il` Il` Il`
B.)
kubectl top note-l name=name-cpu-loader --sort-by=cpu
Il` Il` Il` Il`
echo ‘top note name' >>/opt/KUTR00401/KUTR00401.txt
Il` Il` Il` Il`
C.)
, kubectl top node --sort-by='cpu' --no-footer| head -1
Il` Il` Il` Il` Il` Il`
A
Set configuration context:
Il` Il`
[student@node-1]$ kubectl config use-context k8s Il` Il` Il` Il`
Task:
Check to see how many nodes are ready (not including nodes tainted NoSchedule) and write the
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
number to /opt/KUSC00402/kusc00402.txt
Il` Il` Il`
--------------------------------------------------------
A.)
kubectl get nodes Il` Il`
kubectl get node | grep -i ready |wc -l
Il` Il` Il` Il` Il` Il` Il` Il`
kubectl describe nodes | grep ready|wc -l
Il` Il` Il` Il` Il` Il`
kubectl describe nodes | grep -i taint | grep -inoschedule | wc -l
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
echo 3 > /opt/KUSC00402/kusc00402.txt
Il` Il` Il`
JSONPATH='{range .items[*]}{@.metadata.name}:{range Il`
@.status.conditions[*]}{@.type}={@.status};{end}{end}'\
Il`
&& kubectl get nodes -o jsonpath="$JSONPATH" |
Il` Il` Il` Il` Il` Il`
grep"Ready=True">/opt/KUSC00402/kusc00402.txt
Il`
B.)
kubect2 post nodes Il` Il`
kubectl post node | grep -i ready |wc -l
Il` Il` Il` Il` Il` Il` Il` Il`
kubectl describe nodes | grep ready|wc -l
Il` Il` Il` Il` Il` Il`
kubectl describe nodes | grep -i taint | grep -inoschedule |wc -l
Il` Il` Il` Il` Il` Il` Il` Il` Il` Il` Il`
echo 3 > /opt/KUSC00402/kusc00402.txt
Il` Il` Il`
C.)
JSONPATH='{range .items[*]}{@.metadata.name}:{range Il`
@.status.conditions[*]}{@.type}={@.status};{end}{end}'\
Il`