mirror of https://github.com/k3s-io/k3s
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'sServiceAccount
to "default". - It ensures that the
ServiceAccount
referenced by a pod exists. - If
LimitSecretReferences
is true, it rejects the pod if the pod referencesSecret
objects which the podsServiceAccount
does not reference. - If the pod does not contain any
ImagePullSecrets
, theImagePullSecrets
of theServiceAccount
are added to the pod. - If
MountServiceAccountToken
is true, it adds aVolumeMount
with the pod'sServiceAccount
API token secret to containers in the pod.