projected service account token

A short-lived, signed token for a service account that the kubelet mounts into a pod and refreshes, valid only for a stated audience.

Anyone holding a valid token can act as the service account until it expires.

In more detail

Because it expires and names its intended audience, a stolen copy is useful for a short time and only to the right receiver, which limits replay. kubectl create token issues one on demand with a chosen duration. Older clusters used long-lived tokens stored in Secrets, which you should avoid.

Examples

kubectl create token web --duration=10m
Projected tokens expire within hours and stop working when the pod is deleted, so a stolen one is far less useful than a long-lived token Secret.

Related terms

Taught in

References

Certification courses