mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Address most of the comments from #8936 review. Adds minimal documentation for securityContext and serviceAccounts, which I will expand in a future PR. Adds analytics. Links admission_controllers.md from cluster-admin-guide.
1.1 KiB
1.1 KiB
Service Accounts
A serviceAccount provides an identity for processes that run in a Pod. The behavior of the the serviceAccount object is implemented via a plugin called an Admission Controller. When this plugin is active (and it is by default on most distributions), then it does the following when a pod is created or modified:
- If the pod does not have a
ServiceAccount, it modifies the pod'sServiceAccountto "default". - It ensures that the
ServiceAccountreferenced by a pod exists. - If
LimitSecretReferencesis true, it rejects the pod if the pod referencesSecretobjects which the podsServiceAccountdoes not reference. - If the pod does not contain any
ImagePullSecrets, theImagePullSecretsof theServiceAccountare added to the pod. - If
MountServiceAccountTokenis true, it adds aVolumeMountwith the pod'sServiceAccountAPI token secret to containers in the pod.