Kubernetes 401 Unauthorized, token not copied to containers Kubernetes 401 Unauthorized, token not copied to containers kubernetes kubernetes

Kubernetes 401 Unauthorized, token not copied to containers


The service account token secret should be added as a volume when the pods are created. This is done by the ServiceAccount admission plugin.

Some questions:

  1. If you inspect one of the running pods in the API, does it include a volume and volume mount referencing a service account token?

  2. What admission plugins do you have configured for your API server?


The token is itself created during admission control processing.

The setting recommended for >1.4 is

--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota

Mind the "ServiceAccount" part!

See original doc