How do Kubernetes workloads authenticate to Vault?
AdvancedConceptSecrets Management and Identity
Answer
With the Kubernetes auth method. The pod presents its projected ServiceAccount JWT; Vault validates it via the TokenReview API (or JWKS in newer setups) and maps the ServiceAccount name and namespace to a Vault role, which carries policies and a TTL.
vault write auth/kubernetes/role/app \
bound_service_account_names=app bound_service_account_namespaces=prod \
policies=app-read ttl=15m
Delivery to the pod is via Vault Agent injector, the Secrets Store CSI driver, or Vault Secrets Operator.
More on Secrets Management and Identity
Why is hard-coding secrets or putting them in environment variables a problem?BeginnerWhat does HashiCorp Vault provide?BeginnerExplain Vault's seal/unseal process.IntermediateWhat are Vault dynamic secrets and why are they better than static ones?IntermediateWhat is AWS Secrets Manager and how does it compare with SSM Parameter Store?BeginnerWhat is External Secrets Operator?Intermediate