Kubernetes CKA sample exam question 47 with answer

Question
Check Kubernetes cluster for all available nodes where you can deploy your workloads. Place your findings (number of nodes) in ~/available_nodes.txt

Answer
Get total number of nodes:

kubectl get nodes
We can see 3 nodes cluster: controlplane, node01 and node02. Check taints for each node:
kubectl describe node controlplane | grep -i taint
kubectl describe node node01 | grep -i taint
kubectl describe node node02 | grep -i taint
Can be noticed that only controlplane have taints - other nodes do not have. So place the findings in the file:
echo 2 > ~/available_nodes.txt