CKA Domain 1: Cluster Architecture, Installation, and Configuration
49 free practice questions for Cluster Architecture, Installation, and Configuration in the Certified Kubernetes Administrator (CKA) exam. Try each question first, then open "Show answer" for the correct option and explanation.
Cluster Architecture, Installation, and Configuration practice questions
-
Question 1. Which control plane component stores all cluster state?
Show answer
Answer: A. etcd
etcd is the consistent key/value store behind the API server. Losing it without a backup means losing cluster state.
-
Question 2. Which component is the only one that talks directly to etcd?
Show answer
Answer: C. kube-apiserver
All other components read and write cluster state through the API server.
-
Question 3. Which component assigns newly created Pods to nodes?
Show answer
Answer: C. kube-scheduler
The scheduler picks a node based on resources, affinity, taints, and other constraints, then binds the Pod.
-
Question 4. Which component on each node starts containers and reports Pod status?
Show answer
Answer: B. kubelet
The kubelet ensures the containers described in PodSpecs are running, using the container runtime through CRI.
-
Question 5. Which component runs controllers such as the Deployment and Node controllers?
Show answer
Answer: B. kube-controller-manager
The controller manager runs the control loops that drive actual state toward desired state.
-
Question 6. On a kubeadm cluster, where are the manifests for the control plane static Pods stored?
Show answer
Answer: B. /etc/kubernetes/manifests
The kubelet watches this directory and runs the static Pods it finds, such as kube-apiserver and etcd.
-
Question 7. Which command initializes a new control plane with kubeadm?
Show answer
Answer: A. kubeadm init
kubeadm init sets up the first control plane node and prints a join command for other nodes.
-
Question 8. A join token has expired. Which command prints a new worker join command?
Show answer
Answer: C. kubeadm token create --print-join-command
Tokens expire after 24 hours by default. This command creates a new one with the full join command.
-
Question 9. What must be installed before Pods on different nodes can communicate on a new kubeadm cluster?
Show answer
Answer: D. A CNI network plugin, such as Calico
Until a CNI plugin is installed, nodes stay NotReady and CoreDNS Pods stay Pending.
-
Question 10. Which kernel settings are typically required on nodes before running kubeadm?
Show answer
Answer: A. br_netfilter loaded and net.ipv4.ip_forward=1
Bridged traffic must pass through iptables and IP forwarding must be enabled. Swap is also usually disabled.
-
Question 11. Which interface does the kubelet use to talk to container runtimes such as containerd?
Show answer
Answer: D. CRI
The Container Runtime Interface separates the kubelet from specific runtimes. CNI is for networking and CSI for storage.
-
Question 12. Which interface lets storage vendors provide volume drivers outside the Kubernetes codebase?
Show answer
Answer: B. CSI
The Container Storage Interface standardizes how storage systems plug into Kubernetes.
-
Question 13. What is the first step when upgrading a kubeadm cluster from 1.30 to 1.31?
Show answer
Answer: B. Upgrade kubeadm on the first control plane node
Control plane nodes are upgraded first, one minor version at a time, followed by the worker nodes.
-
Question 14. Which command applies the control plane upgrade on the first control plane node?
Show answer
Answer: B. kubeadm upgrade apply v1.31.x
upgrade apply is used on the first control plane node. Other nodes run kubeadm upgrade node.
-
Question 15. Before upgrading the kubelet on a worker node, what should be done?
Show answer
Answer: C. Drain the node with kubectl drain
Draining evicts Pods safely. After upgrading and restarting the kubelet, uncordon the node.
-
Question 16. Which command marks a node unschedulable without evicting its Pods?
Show answer
Answer: B. kubectl cordon node1
cordon stops new Pods from being scheduled. drain cordons and also evicts existing Pods.
-
Question 17. Why does kubectl drain often need --ignore-daemonsets?
Show answer
Answer: C. DaemonSet Pods cannot be evicted to other nodes
DaemonSets run one Pod per node, so draining skips them with this flag.
-
Question 18. Which command saves an etcd snapshot on a kubeadm cluster?
Show answer
Answer: D. etcdctl snapshot save /backup/etcd.db (with TLS flags)
etcdctl needs --endpoints, --cacert, --cert, and --key to connect securely.
-
Question 19. After restoring an etcd snapshot to a new data directory, what else must change?
Show answer
Answer: B. The etcd static Pod manifest must point to the new data directory
Update the hostPath for the etcd data directory so etcd starts with the restored data.
-
Question 20. What does Role-Based Access Control (RBAC) use to grant permissions within one namespace?
Show answer
Answer: A. A Role and a RoleBinding
Roles define permissions in a namespace. RoleBindings grant them to users, groups, or service accounts.
-
Question 21. Which objects grant permissions across the whole cluster, including non-namespaced resources such as nodes?
Show answer
Answer: A. ClusterRole and ClusterRoleBinding
ClusterRoles are cluster-scoped. A ClusterRole can also be bound in one namespace with a RoleBinding.
-
Question 22. Which command creates a Role that allows getting and listing Pods in namespace dev?
Show answer
Answer: C. kubectl create role pod-reader --verb=get,list --resource=pods -n dev
kubectl create role builds the rules. Bind it with kubectl create rolebinding.
-
Question 23. How can an admin check whether user jane can delete Deployments in namespace prod?
Show answer
Answer: D. kubectl auth can-i delete deployments -n prod --as jane
auth can-i with --as impersonates the user and returns yes or no.
-
Question 24. A Pod needs to list ConfigMaps through the API. What should it use?
Show answer
Answer: A. A ServiceAccount bound to a Role that allows listing ConfigMaps
Pods authenticate as their ServiceAccount, and RBAC decides what it can do.
-
Question 25. Which RBAC verb is required to see the Pods listed by kubectl get pods?
Show answer
Answer: D. list
get retrieves one object by name, and list returns a collection.
-
Question 26. What does Helm provide?
Show answer
Answer: C. A package manager that installs applications as charts
Helm charts package Kubernetes manifests with configurable values and support upgrades and rollbacks.
-
Question 27. Which command installs a Helm chart as a release called web with custom values?
Show answer
Answer: A. helm install web repo/chart -f values.yaml
helm install creates a release. helm upgrade updates it, and helm rollback reverts it.
-
Question 28. What does Kustomize do?
Show answer
Answer: B. Customizes plain YAML with overlays, without templates
Kustomize patches base manifests with overlays, and is built into kubectl with kubectl apply -k.
-
Question 29. Which command applies a Kustomize overlay directory?
Show answer
Answer: C. kubectl apply -k overlays/prod
-k tells kubectl to build the kustomization in the directory and apply the result.
-
Question 30. What is a CustomResourceDefinition (CRD)?
Show answer
Answer: A. A way to add new resource types to the Kubernetes API
CRDs extend the API. Operators often use them to manage applications with custom controllers.
-
Question 31. What is a Kubernetes operator?
Show answer
Answer: C. A controller that manages an application using custom resources
Operators encode operational knowledge, such as backups and upgrades, in a controller.
-
Question 32. In a highly available control plane with stacked etcd, how many control plane nodes are recommended at minimum?
Show answer
Answer: D. Three
etcd needs a majority for quorum. Three members tolerate one failure; two members tolerate none.
-
Question 33. What is placed in front of multiple API servers in an HA control plane?
Show answer
Answer: B. A load balancer with one endpoint
Nodes and clients use the load balancer address, set with --control-plane-endpoint during kubeadm init.
-
Question 34. Which file does kubectl read by default for cluster connection details?
Show answer
Answer: D. ~/.kube/config
The KUBECONFIG environment variable or --kubeconfig flag can point elsewhere.
-
Question 35. Which command switches kubectl to a different context?
Show answer
Answer: B. kubectl config use-context prod
Contexts combine a cluster, user, and default namespace.
-
Question 36. Which command sets the default namespace for the current context?
Show answer
Answer: C. kubectl config set-context --current --namespace=dev
This avoids adding -n dev to every command.
-
Question 37. Where does a kubeadm cluster store its certificate authority and component certificates?
Show answer
Answer: B. /etc/kubernetes/pki
The pki directory holds the cluster CA, API server, etcd, and front proxy certificates.
-
Question 38. How can an admin check when kubeadm-managed certificates expire?
Show answer
Answer: C. kubeadm certs check-expiration
kubeadm certs renew renews them. kubeadm upgrades also renew certificates.
-
Question 39. What is the purpose of the admission controllers in the API server?
Show answer
Answer: B. Validate or modify requests before they're stored
Admission controllers, such as NamespaceLifecycle and ResourceQuota, enforce policies on requests.
-
Question 40. Which kubeadm step adds a worker node to the cluster?
Show answer
Answer: D. Run the kubeadm join command on the worker
The join command includes the API endpoint, token, and CA cert hash.
-
Question 41. What should be done with swap on nodes before installing Kubernetes with default settings?
Show answer
Answer: A. Disable it
The kubelet fails to start by default if swap is on, although newer versions can be configured to allow it.
-
Question 42. Which container runtime is commonly used with kubeadm clusters today?
Show answer
Answer: B. containerd
dockershim was removed in Kubernetes 1.24. containerd and CRI-O implement CRI directly.
-
Question 43. Which kubeadm upgrade step is run on additional control plane nodes and on worker nodes?
Show answer
Answer: A. kubeadm upgrade node
upgrade node updates the local kubelet configuration and, on control plane nodes, the static Pods.
-
Question 44. After upgrading kubelet packages on a node, what must be done?
Show answer
Answer: B. Reload systemd and restart the kubelet
The kubelet runs the new version only after a restart.
-
Question 45. Can a kubeadm cluster be upgraded directly from 1.29 to 1.31?
Show answer
Answer: A. No, it must be upgraded one minor version at a time
Skipping minor versions isn't supported. Upgrade to 1.30, then to 1.31.
-
Question 46. Which API group do Roles and ClusterRoles belong to?
Show answer
Answer: D. rbac.authorization.k8s.io
RBAC objects use the rbac.authorization.k8s.io/v1 API.
-
Question 47. Which command binds the built-in view ClusterRole to user sam in namespace qa only?
Show answer
Answer: C. kubectl create rolebinding sam-view --clusterrole=view --user=sam -n qa
A RoleBinding can reference a ClusterRole, limiting its permissions to one namespace.
-
Question 48. Which command lists all API resource types and whether they are namespaced?
Show answer
Answer: A. kubectl api-resources
api-resources lists names, short names, API groups, and the NAMESPACED column.
-
Question 49. Which command shows the fields of a resource type, such as Pod spec, with documentation?
Show answer
Answer: D. kubectl explain pod.spec
kubectl explain is useful during the exam for checking field names.
CKA, Certified Kubernetes Administrator, and Kubernetes are trademarks of The Linux Foundation. These questions are original study material, not questions from the real exam.