Kubernetes Service Account Tokens Do Not Need to Ride Along
Kubernetes gives a Pod an identity by default. A ServiceAccount token is mounted into the container at the standard service-account path unless the Pod or its ServiceAccount opts out. That convenience is useful for controllers and agents that call the API. It also gives every process in the Pod a credential it may not need.
The current Kubernetes documentation is direct about the default: the Pod receives credentials for the assigned ServiceAccount, including the namespace's default account. The ServiceAccount or Pod can set automountServiceAccountToken: false, and the Pod setting takes precedence when both are present. Modern clusters use bound, time-limited tokens in a projected volume, but the default mount and the RBAC attached to the identity still deserve review.
Inventory the identity behind the mount
A token file is only one part of the question. Find the ServiceAccount used by each workload, the roles and RoleBindings bound to it, and the audience for which its token can be requested. A low-privilege application may share a ServiceAccount with a controller that can list Secrets, create Pods, or patch workloads. Disabling automount on the application Pod helps, but the shared identity remains a problem for any process that can obtain a token another way.
The API credentials are documented as revoked after Pod deletion, with a short delay beyond the deletion timestamp. That lifecycle is better than a static secret, but it does not make a copied token harmless. Treat the token as a bearer credential while it is valid and assume a process with access to its file can read it.
Opt out at the right scope
For a workload that does not call the API, set automountServiceAccountToken: false on the ServiceAccount or Pod and verify the rendered Pod specification. Do not stop at a policy file that may be overridden by another manifest. Admission policy, GitOps rendering, and runtime inspection should agree.
For a workload that needs API access, declare a projected volume with the required audience and expiration rather than relying on a broad default. Give the ServiceAccount only the verbs and resources the workload uses. If the process needs to call an external service, consider workload identity or a separate token exchange instead of reusing the cluster identity.
Example:
apiVersion: v1 kind: ServiceAccount metadata: name: report-reader automountServiceAccountToken: false Then mount a specific projected token only in the container that needs it. The container runtime should not expose the token path to sidecars or init containers that have no use for it.
Test the actual Pod
Use a read-only inspection command to confirm the volume and mount:
kubectl get pod <pod> -n <namespace> -o json kubectl auth can-i --list --as=system:serviceaccount:<namespace>:<serviceaccount> Check for a service-account token volume, the projected audience, and the effective RBAC. Then test from inside the workload with the real process identity. A missing file in one container does not prove that another container in the Pod lacks the same authority.
Limits
Disabling automount is not a complete authorization model. A Pod with a privileged volume, hostPath, or access to the kubelet credentials may still reach cluster data. The control is most effective when it is paired with dedicated ServiceAccounts, least-privilege RBAC, namespace policy, and workload isolation.
