Kubernetes CKA sample exam question 21 with answer

Question
One static pod web-static with image busybox, is currently running on controlplane node, move that static pod to run on node01, don't need to do any other changes.
Note: static pod name should be changed from web-static-controlplane to web-static-node01

Answer
Get some details:

kubectl get po
kubectl get po -o wide
we can see one static pod running on controlplane
Get commandline options for the kubelet process running on controlplane. Look for --config option:
ps aux | grep kubelet
the --config path value is /var/lib/kubelet/config.yaml
grep that file for the staticPod to get the static pods path on controlplane:
grep staticPod /var/lib/kubelet/config.yaml
The static pods path dir is /etc/kubernetes/manifests
Get the contents of that directory and find that static pod manifest:
ls etc/kubernetes/manifests
cat static.yaml
SSH to the node01 and repeat the procedure:
ssh node01
ps aux | grep kubelet
grep staticPod /var/lib/kubelet/config.yaml
The static pods path dir is /etc/kubernetes/manifests
Go back to controlplane and scp the manifest yaml from controlplane to node01. Also, after copying delete source file:
scp /etc/kubernetes/manifests/static,yaml node01:/etc/kubernetes/manifests/static.yaml
rm /etc/kubernetes/manifests/static,yaml
Wait some time and get the status:
kubectl get po -o wide
You should have web-static-node01 pod running