Certified Kubernetes Application Developer (CKAD) Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Enhance your skills for the CKAD exam. Study with curated quizzes and detailed explanations. Prepare effectively for your success!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which property should be set to specify the service account for a pod?

  1. .spec.serviceAccount

  2. .spec.accountName

  3. .spec.serviceAccountName

  4. .pod.serviceAccount

The correct answer is: .spec.serviceAccountName

To specify the service account for a pod in Kubernetes, the correct property to set is `.spec.serviceAccountName`. This property allows you to define which service account the pod will use for its API access, thereby granting it the associated permissions defined by the Role or ClusterRole linked to that service account. When a pod is created, it utilizes the service account to authenticate requests to the Kubernetes API server. Setting the service account correctly is crucial for managing permissions effectively and ensuring that the pod has the rights it needs to operate as intended, particularly when interacting with cluster resources or APIs. The other choices do not reflect the correct Kubernetes API specification: `.spec.serviceAccount` and `.pod.serviceAccount` are not valid properties, and `.spec.accountName` does not exist in the Kubernetes API documentation for pod specifications, which further emphasizes that `.spec.serviceAccountName` is indeed the correct property.