What is the primary purpose of a Kubernetes ServiceAccount?
Trap 1: To grant permissions to users
Permissions are granted via RBAC (RoleBinding/ClusterRoleBinding) to users or ServiceAccounts.
Trap 2: To define network policies for Pods
Network policies are defined using NetworkPolicy resources.
Trap 3: To store Docker registry credentials
That is the purpose of a Secret of type kubernetes.io/dockerconfigjson.
- A
To provide an identity for processes running in a Pod
ServiceAccount is used to identify the Pod when it interacts with the Kubernetes API or other services.
- B
To grant permissions to users
Why wrong: Permissions are granted via RBAC (RoleBinding/ClusterRoleBinding) to users or ServiceAccounts.
- C
To define network policies for Pods
Why wrong: Network policies are defined using NetworkPolicy resources.
- D
To store Docker registry credentials
Why wrong: That is the purpose of a Secret of type kubernetes.io/dockerconfigjson.