A serviceAccount provides an identity for processes that run in a Pod.
The behavior of the the serviceAccount object is implemented via a plugin
A service account provides an identity for processes that run in a Pod.
called an [Admission Controller](admission_controllers.md). 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:
*This is a user introduction to Service Accounts. See also the
1. If the pod does not have a ```ServiceAccount```, it modifies the pod's ```ServiceAccount``` to "default".
[Cluster Admin Guide to Service Accounts](service_accounts_admin.md).*
2. It ensures that the ```ServiceAccount``` referenced by a pod exists.
3. If ```LimitSecretReferences``` is true, it rejects the pod if the pod references ```Secret``` objects which the pods
*Note: This document descibes how service accounts behave in a cluster set up
```ServiceAccount``` does not reference.
as recommended by the Kubernetes project. Your cluster administrator may have
4. If the pod does not contain any ```ImagePullSecrets```, the ```ImagePullSecrets``` of the
customized the behavior in your cluster, in which case this documentation may
```ServiceAccount``` are added to the pod.
not apply.*
5. If ```MountServiceAccountToken``` is true, it adds a ```VolumeMount``` with the pod's ```ServiceAccount``` API token secret to containers in the pod.
When you (a human) access the cluster (e.g. using kubectl), you are
authenticated by the apiserver as a particular User Account (currently this is
usually "admin", unless your cluster administrator has customized your
cluster). Processes in containers inside pods can also contact the apiserver.
When they do, they are authenticated as a particular Service Account (e.g.
"default").
## Using the Default Service Account to access the API server.
When you create a pod, you do not need to specify a service account. It is
automatically assigned the `default` service account of the same namespace. If
you get the raw json or yaml for a pod you have created (e.g. `kubectl get
pods/podname -o yaml`), you can see the `spec.serviceAccount` field has been