When a Pod is created in Kubernetes without specifying a Service Account, which default Service Account is used?

Study for the Kubernetes Certified Network Administrator Exam. Our test offers comprehensive flashcards, multiple-choice questions, and detailed explanations. Be confident for your exam!

Multiple Choice

When a Pod is created in Kubernetes without specifying a Service Account, which default Service Account is used?

Explanation:
When a Pod starts without a specified ServiceAccount, Kubernetes uses the namespace’s default service account. Every namespace has a default ServiceAccount named default that is created automatically. The Pod runs with that identity, and a token for that ServiceAccount is mounted into the Pod so it can access the Kubernetes API according to the permissions bound to that SA. If you want the Pod to use a different identity, you would set serviceAccountName in the Pod spec to the name of another pre-created ServiceAccount. The other names listed would only apply if such ServiceAccounts exist and are explicitly referenced.

When a Pod starts without a specified ServiceAccount, Kubernetes uses the namespace’s default service account. Every namespace has a default ServiceAccount named default that is created automatically. The Pod runs with that identity, and a token for that ServiceAccount is mounted into the Pod so it can access the Kubernetes API according to the permissions bound to that SA. If you want the Pod to use a different identity, you would set serviceAccountName in the Pod spec to the name of another pre-created ServiceAccount. The other names listed would only apply if such ServiceAccounts exist and are explicitly referenced.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy