CKA · Domain 1 of 5 · 25% of the exam

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

  1. Question 1. Which control plane component stores all cluster state?

    1. etcd
    2. kube-scheduler
    3. kube-proxy
    4. kubelet
    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.

  2. Question 2. Which component is the only one that talks directly to etcd?

    1. kube-scheduler
    2. kube-controller-manager
    3. kube-apiserver
    4. kubelet
    Show answer

    Answer: C. kube-apiserver

    All other components read and write cluster state through the API server.

  3. Question 3. Which component assigns newly created Pods to nodes?

    1. kube-controller-manager
    2. kubelet
    3. kube-scheduler
    4. kube-proxy
    Show answer

    Answer: C. kube-scheduler

    The scheduler picks a node based on resources, affinity, taints, and other constraints, then binds the Pod.

  4. Question 4. Which component on each node starts containers and reports Pod status?

    1. kube-proxy
    2. kubelet
    3. kube-scheduler
    4. etcd
    Show answer

    Answer: B. kubelet

    The kubelet ensures the containers described in PodSpecs are running, using the container runtime through CRI.

  5. Question 5. Which component runs controllers such as the Deployment and Node controllers?

    1. kube-scheduler
    2. kube-controller-manager
    3. cloud-init
    4. kube-proxy
    Show answer

    Answer: B. kube-controller-manager

    The controller manager runs the control loops that drive actual state toward desired state.

  6. Question 6. On a kubeadm cluster, where are the manifests for the control plane static Pods stored?

    1. /var/lib/kubelet/pods
    2. /etc/kubernetes/manifests
    3. /etc/cni/net.d
    4. /opt/kubernetes/bin
    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.

  7. Question 7. Which command initializes a new control plane with kubeadm?

    1. kubeadm init
    2. kubeadm join
    3. kubeadm upgrade apply
    4. kubeadm reset
    Show answer

    Answer: A. kubeadm init

    kubeadm init sets up the first control plane node and prints a join command for other nodes.

  8. Question 8. A join token has expired. Which command prints a new worker join command?

    1. kubeadm init phase upload-token --renew
    2. kubectl create token node --print-join
    3. kubeadm token create --print-join-command
    4. kubeadm join --renew-token --print-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.

  9. Question 9. What must be installed before Pods on different nodes can communicate on a new kubeadm cluster?

    1. An Ingress controller, such as ingress-nginx
    2. A CSI storage driver for persistent volumes
    3. The metrics server for resource metrics
    4. A CNI network plugin, such as Calico
    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.

  10. Question 10. Which kernel settings are typically required on nodes before running kubeadm?

    1. br_netfilter loaded and net.ipv4.ip_forward=1
    2. SELinux enforcing and IPv6 disabled
    3. Transparent huge pages enabled
    4. The firewall service removed entirely
    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.

  11. Question 11. Which interface does the kubelet use to talk to container runtimes such as containerd?

    1. CNI
    2. CSI
    3. OCI registry API
    4. CRI
    Show answer

    Answer: D. CRI

    The Container Runtime Interface separates the kubelet from specific runtimes. CNI is for networking and CSI for storage.

  12. Question 12. Which interface lets storage vendors provide volume drivers outside the Kubernetes codebase?

    1. CRI
    2. CSI
    3. CNI
    4. SMI
    Show answer

    Answer: B. CSI

    The Container Storage Interface standardizes how storage systems plug into Kubernetes.

  13. Question 13. What is the first step when upgrading a kubeadm cluster from 1.30 to 1.31?

    1. Upgrade the kubelet on all worker nodes at once
    2. Upgrade kubeadm on the first control plane node
    3. Upgrade kubectl on the admin workstation only
    4. Delete etcd and recreate it on the new version
    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.

  14. Question 14. Which command applies the control plane upgrade on the first control plane node?

    1. kubeadm upgrade node
    2. kubeadm upgrade apply v1.31.x
    3. kubectl upgrade cluster v1.31.x
    4. kubelet --upgrade v1.31.x
    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.

  15. Question 15. Before upgrading the kubelet on a worker node, what should be done?

    1. Delete the node from the cluster
    2. Stop the API server
    3. Drain the node with kubectl drain
    4. Remove the CNI plugin
    Show answer

    Answer: C. Drain the node with kubectl drain

    Draining evicts Pods safely. After upgrading and restarting the kubelet, uncordon the node.

  16. Question 16. Which command marks a node unschedulable without evicting its Pods?

    1. kubectl drain node1
    2. kubectl cordon node1
    3. kubectl delete node node1
    4. kubectl taint node1 --all
    Show answer

    Answer: B. kubectl cordon node1

    cordon stops new Pods from being scheduled. drain cordons and also evicts existing Pods.

  17. Question 17. Why does kubectl drain often need --ignore-daemonsets?

    1. DaemonSets block all nodes from draining
    2. DaemonSets are deleted when a node is drained
    3. DaemonSet Pods cannot be evicted to other nodes
    4. DaemonSets require a restart of the API server
    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.

  18. Question 18. Which command saves an etcd snapshot on a kubeadm cluster?

    1. kubectl get all -A -o yaml > /backup/cluster.yaml
    2. kubeadm backup etcd --output /backup/etcd.db
    3. cp -r /etc/kubernetes/manifests /backup/etcd
    4. etcdctl snapshot save /backup/etcd.db (with TLS flags)
    Show answer

    Answer: D. etcdctl snapshot save /backup/etcd.db (with TLS flags)

    etcdctl needs --endpoints, --cacert, --cert, and --key to connect securely.

  19. Question 19. After restoring an etcd snapshot to a new data directory, what else must change?

    1. The kubelet config must disable static Pods
    2. The etcd static Pod manifest must point to the new data directory
    3. Every Deployment must be recreated manually
    4. The CNI plugin must be reinstalled
    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.

  20. Question 20. What does Role-Based Access Control (RBAC) use to grant permissions within one namespace?

    1. A Role and a RoleBinding
    2. A ClusterRole and a ServiceAccount only
    3. A NetworkPolicy and a Service
    4. A ConfigMap and a Secret
    Show answer

    Answer: A. A Role and a RoleBinding

    Roles define permissions in a namespace. RoleBindings grant them to users, groups, or service accounts.

  21. Question 21. Which objects grant permissions across the whole cluster, including non-namespaced resources such as nodes?

    1. ClusterRole and ClusterRoleBinding
    2. Role and RoleBinding
    3. ServiceAccount and Secret
    4. ResourceQuota and LimitRange
    Show answer

    Answer: A. ClusterRole and ClusterRoleBinding

    ClusterRoles are cluster-scoped. A ClusterRole can also be bound in one namespace with a RoleBinding.

  22. Question 22. Which command creates a Role that allows getting and listing Pods in namespace dev?

    1. kubectl create rolebinding pod-reader --verb=get,list -n dev
    2. kubectl auth create pod-reader --pods -n dev
    3. kubectl create role pod-reader --verb=get,list --resource=pods -n dev
    4. kubectl create clusterrole pod-reader --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.

  23. Question 23. How can an admin check whether user jane can delete Deployments in namespace prod?

    1. kubectl get rolebindings -n prod --user jane
    2. kubectl describe user jane -n prod
    3. kubectl check permissions jane prod
    4. kubectl auth can-i delete deployments -n prod --as jane
    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.

  24. Question 24. A Pod needs to list ConfigMaps through the API. What should it use?

    1. A ServiceAccount bound to a Role that allows listing ConfigMaps
    2. A Secret containing the admin kubeconfig
    3. A NetworkPolicy allowing API traffic
    4. A hostPath mount of /etc/kubernetes
    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.

  25. Question 25. Which RBAC verb is required to see the Pods listed by kubectl get pods?

    1. watch only
    2. create
    3. patch
    4. list
    Show answer

    Answer: D. list

    get retrieves one object by name, and list returns a collection.

  26. Question 26. What does Helm provide?

    1. A container runtime for Kubernetes nodes
    2. A CNI plugin for Pod networking
    3. A package manager that installs applications as charts
    4. A backup tool for etcd
    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.

  27. Question 27. Which command installs a Helm chart as a release called web with custom values?

    1. helm install web repo/chart -f values.yaml
    2. helm create web repo/chart --values
    3. kubectl helm install web repo/chart
    4. helm apply web -f values.yaml
    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.

  28. Question 28. What does Kustomize do?

    1. Compiles Go templates into Helm charts
    2. Customizes plain YAML with overlays, without templates
    3. Converts Docker Compose files into Pods
    4. Encrypts Secrets stored in Git
    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.

  29. Question 29. Which command applies a Kustomize overlay directory?

    1. kubectl apply -f overlays/prod --kustomize
    2. kustomize install overlays/prod
    3. kubectl apply -k overlays/prod
    4. helm install overlays/prod
    Show answer

    Answer: C. kubectl apply -k overlays/prod

    -k tells kubectl to build the kustomization in the directory and apply the result.

  30. Question 30. What is a CustomResourceDefinition (CRD)?

    1. A way to add new resource types to the Kubernetes API
    2. A template for creating Pods
    3. A policy that restricts container images
    4. A storage class for custom volumes
    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.

  31. Question 31. What is a Kubernetes operator?

    1. A human administrator with cluster-admin rights
    2. A kubectl plugin for editing YAML
    3. A controller that manages an application using custom resources
    4. The process that runs kubeadm init
    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.

  32. Question 32. In a highly available control plane with stacked etcd, how many control plane nodes are recommended at minimum?

    1. Two
    2. One
    3. Four
    4. Three
    Show answer

    Answer: D. Three

    etcd needs a majority for quorum. Three members tolerate one failure; two members tolerate none.

  33. Question 33. What is placed in front of multiple API servers in an HA control plane?

    1. A NodePort Service on each control plane node
    2. A load balancer with one endpoint
    3. An Ingress resource in kube-system
    4. A second etcd cluster for API requests
    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.

  34. Question 34. Which file does kubectl read by default for cluster connection details?

    1. /etc/kubernetes/kubelet.conf
    2. /var/lib/etcd/config
    3. /etc/hosts
    4. ~/.kube/config
    Show answer

    Answer: D. ~/.kube/config

    The KUBECONFIG environment variable or --kubeconfig flag can point elsewhere.

  35. Question 35. Which command switches kubectl to a different context?

    1. kubectl set context prod
    2. kubectl config use-context prod
    3. kubectl context switch prod
    4. kubectl config set-cluster prod
    Show answer

    Answer: B. kubectl config use-context prod

    Contexts combine a cluster, user, and default namespace.

  36. Question 36. Which command sets the default namespace for the current context?

    1. kubectl namespace set dev
    2. kubectl use-namespace dev
    3. kubectl config set-context --current --namespace=dev
    4. kubectl config default-namespace dev
    Show answer

    Answer: C. kubectl config set-context --current --namespace=dev

    This avoids adding -n dev to every command.

  37. Question 37. Where does a kubeadm cluster store its certificate authority and component certificates?

    1. /etc/ssl/kubernetes
    2. /etc/kubernetes/pki
    3. /var/lib/kubelet/certs only
    4. /root/.kube/certs
    Show answer

    Answer: B. /etc/kubernetes/pki

    The pki directory holds the cluster CA, API server, etcd, and front proxy certificates.

  38. Question 38. How can an admin check when kubeadm-managed certificates expire?

    1. kubectl get certificates -A
    2. openssl verify /etc/kubernetes
    3. kubeadm certs check-expiration
    4. kubeadm token list
    Show answer

    Answer: C. kubeadm certs check-expiration

    kubeadm certs renew renews them. kubeadm upgrades also renew certificates.

  39. Question 39. What is the purpose of the admission controllers in the API server?

    1. Schedule new Pods onto suitable nodes
    2. Validate or modify requests before they're stored
    3. Encrypt all traffic between Pods
    4. Store the cluster data on disk
    Show answer

    Answer: B. Validate or modify requests before they're stored

    Admission controllers, such as NamespaceLifecycle and ResourceQuota, enforce policies on requests.

  40. Question 40. Which kubeadm step adds a worker node to the cluster?

    1. Run kubeadm init on the worker
    2. Run kubectl add node on the control plane
    3. Copy etcd data to the worker
    4. Run the kubeadm join command on the worker
    Show answer

    Answer: D. Run the kubeadm join command on the worker

    The join command includes the API endpoint, token, and CA cert hash.

  41. Question 41. What should be done with swap on nodes before installing Kubernetes with default settings?

    1. Disable it
    2. Enable it with a large size
    3. Mount it on /var/lib/kubelet
    4. Encrypt it with LUKS only
    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.

  42. Question 42. Which container runtime is commonly used with kubeadm clusters today?

    1. dockershim
    2. containerd
    3. rkt
    4. LXD
    Show answer

    Answer: B. containerd

    dockershim was removed in Kubernetes 1.24. containerd and CRI-O implement CRI directly.

  43. Question 43. Which kubeadm upgrade step is run on additional control plane nodes and on worker nodes?

    1. kubeadm upgrade node
    2. kubeadm upgrade apply
    3. kubeadm init phase upgrade
    4. kubeadm join --upgrade
    Show answer

    Answer: A. kubeadm upgrade node

    upgrade node updates the local kubelet configuration and, on control plane nodes, the static Pods.

  44. Question 44. After upgrading kubelet packages on a node, what must be done?

    1. Reboot every node in the whole cluster
    2. Reload systemd and restart the kubelet
    3. Delete and recreate all Pods on the node
    4. Reinstall the CNI plugin on the node
    Show answer

    Answer: B. Reload systemd and restart the kubelet

    The kubelet runs the new version only after a restart.

  45. Question 45. Can a kubeadm cluster be upgraded directly from 1.29 to 1.31?

    1. No, it must be upgraded one minor version at a time
    2. Yes, kubeadm supports skipping any number of versions
    3. Yes, but only on single-node clusters
    4. No, clusters can never be upgraded
    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.

  46. Question 46. Which API group do Roles and ClusterRoles belong to?

    1. apps
    2. networking.k8s.io
    3. storage.k8s.io
    4. rbac.authorization.k8s.io
    Show answer

    Answer: D. rbac.authorization.k8s.io

    RBAC objects use the rbac.authorization.k8s.io/v1 API.

  47. Question 47. Which command binds the built-in view ClusterRole to user sam in namespace qa only?

    1. kubectl create clusterrolebinding sam-view --clusterrole=view --user=sam
    2. kubectl create role sam-view --clusterrole=view -n qa
    3. kubectl create rolebinding sam-view --clusterrole=view --user=sam -n qa
    4. kubectl bind view sam qa
    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.

  48. Question 48. Which command lists all API resource types and whether they are namespaced?

    1. kubectl api-resources
    2. kubectl get all
    3. kubectl explain --all
    4. kubectl api-versions --namespaced
    Show answer

    Answer: A. kubectl api-resources

    api-resources lists names, short names, API groups, and the NAMESPACED column.

  49. Question 49. Which command shows the fields of a resource type, such as Pod spec, with documentation?

    1. kubectl describe pod.spec
    2. kubectl get pod -o spec
    3. kubectl help pod.spec
    4. kubectl explain pod.spec
    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.