Kubetier
  1. Create a kubernetes.io/service-account-token Secret annotated with the target ServiceAccount name.

  2. The token controller populates .data.token with a signed JWT for that ServiceAccount which does not expire.

  3. Population happens after the create response returns, so the token is never in the create result.

  4. Retrieval therefore needs get, list, or watch on secrets, or a pod that mounts the Secret.

    create alone mints a credential the caller cannot read.

  5. Authenticate as the target ServiceAccount with the retrieved token.

Rights needed, any one set:

Note:

The token controller still populates kubernetes.io/service-account-token Secrets created by hand, and long-lived token Secrets remain supported.

Restrict create on secrets and audit for hand-made token Secrets in kube-system.

K8s docs ↗