What is a ServiceAccount, and how do pods use it?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

What is a ServiceAccount, and how do pods use it?

Explanation:
A ServiceAccount is an identity for workloads to authenticate to the Kubernetes API server. When a pod runs, it is associated with a ServiceAccount (a default one if none is specified), and the cluster automatically provides a token for that account. That token is mounted into the pod (as a secret, typically exposed as a file) so the pod’s applications can call the API server using HTTP requests with a Bearer token. This identity lets the API server apply RBAC rules to determine what the pod is allowed to do, such as listing resources, watching for changes, or creating specific objects. The token can be rotated by the system, and the pod will continue to use the new token as long as the secret is updated. This is why ServiceAccounts are about identity and API access, not about network policies, storing container images, or exporting logs.

A ServiceAccount is an identity for workloads to authenticate to the Kubernetes API server. When a pod runs, it is associated with a ServiceAccount (a default one if none is specified), and the cluster automatically provides a token for that account. That token is mounted into the pod (as a secret, typically exposed as a file) so the pod’s applications can call the API server using HTTP requests with a Bearer token. This identity lets the API server apply RBAC rules to determine what the pod is allowed to do, such as listing resources, watching for changes, or creating specific objects. The token can be rotated by the system, and the pod will continue to use the new token as long as the secret is updated. This is why ServiceAccounts are about identity and API access, not about network policies, storing container images, or exporting logs.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy