CKA TEST QUESTIONS AND CORRECT
ANSWERS.
What command lists everything in a Kubernetes namespace?
kubectl get all -A
How are DaemonSets similar to ReplicaSets?
Both ensure a specified number of pod replicas run, but DaemonSets ensure one pod per node.
What field in a pod specification forces a pod to run on a specific node?
nodeName
What ensures that critical control plane pods (like etcd, kube-apiserver, and controller-
manager) stay running?
The Kubelet ensures that critical control plane pods stay running by continuously monitoring
static pods defined in the kube manifest files. If a pod crashes or is deleted, Kubelet
automatically restarts it.
Where does Kubelet read static pod manifests from by default?
/etc/kubernetes/manifests
How can you change the path Kubelet reads static pod manifests from?
Modify staticPodPath in the Kubelet configuration file
Where is the Kubelet config file located?
The file can be found under /var/lib/kubelet/config.yaml on each node.
How does Kubelet run on every node in Kubernetes?
Kubelet runs as a systemd service or static pod on every node in the cluster. It registers the node
with the API server, watches for assigned pods, and ensures containers are running. It interacts
with the container runtime (e.g., containerd, CRI-O, Docker) to start and stop containers as
, needed. On the control plane, Kubelet also manages static pods that run critical control plane
components like kube-apiserver, etcd, kube-controller-manager, and kube-scheduler.
How can you view static pods using Docker?
docker ps (if using Docker as the container runtime)
How are static pod names formatted?
They are suffixed with the node's hostname.
How can you check if a pod is a static pod?
Look at its ownerReferences field in the YAML; it should say node.
What command runs a BusyBox container with a sleep command?
kubectl run static-busybox --image=busybox --command -- sleep 1000
What field in a pod spec sets a custom scheduler?
schedulerName
What command displays events such as which node picked up a pod?
kubectl get events -o wide
What field sets pod scheduling priority?
priorityClassName
What are the four stages of the Kubernetes scheduler?
Scheduling queue, filtering, scoring, binding
What can be customized at each stage of scheduling?
Plugins
How does a filtering plugin work in the scheduler?
It filters out nodes that do not match the pod's nodeName.
What do scheduler profiles allow in Kubernetes?
ANSWERS.
What command lists everything in a Kubernetes namespace?
kubectl get all -A
How are DaemonSets similar to ReplicaSets?
Both ensure a specified number of pod replicas run, but DaemonSets ensure one pod per node.
What field in a pod specification forces a pod to run on a specific node?
nodeName
What ensures that critical control plane pods (like etcd, kube-apiserver, and controller-
manager) stay running?
The Kubelet ensures that critical control plane pods stay running by continuously monitoring
static pods defined in the kube manifest files. If a pod crashes or is deleted, Kubelet
automatically restarts it.
Where does Kubelet read static pod manifests from by default?
/etc/kubernetes/manifests
How can you change the path Kubelet reads static pod manifests from?
Modify staticPodPath in the Kubelet configuration file
Where is the Kubelet config file located?
The file can be found under /var/lib/kubelet/config.yaml on each node.
How does Kubelet run on every node in Kubernetes?
Kubelet runs as a systemd service or static pod on every node in the cluster. It registers the node
with the API server, watches for assigned pods, and ensures containers are running. It interacts
with the container runtime (e.g., containerd, CRI-O, Docker) to start and stop containers as
, needed. On the control plane, Kubelet also manages static pods that run critical control plane
components like kube-apiserver, etcd, kube-controller-manager, and kube-scheduler.
How can you view static pods using Docker?
docker ps (if using Docker as the container runtime)
How are static pod names formatted?
They are suffixed with the node's hostname.
How can you check if a pod is a static pod?
Look at its ownerReferences field in the YAML; it should say node.
What command runs a BusyBox container with a sleep command?
kubectl run static-busybox --image=busybox --command -- sleep 1000
What field in a pod spec sets a custom scheduler?
schedulerName
What command displays events such as which node picked up a pod?
kubectl get events -o wide
What field sets pod scheduling priority?
priorityClassName
What are the four stages of the Kubernetes scheduler?
Scheduling queue, filtering, scoring, binding
What can be customized at each stage of scheduling?
Plugins
How does a filtering plugin work in the scheduler?
It filters out nodes that do not match the pod's nodeName.
What do scheduler profiles allow in Kubernetes?