After a cluster upgrade, Vault Kubernetes auth fails for every pod with `error validating token: invalid issuer (iss) claim`
AdvancedTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → Bound projected tokens carry an issuer such as https://oidc.eks.<region>.amazonaws.com/id/... or https://kubernetes.default.svc.cluster.local, and it does not match the issuer set in the auth config. A related failure: the token_reviewer_jwt was a legacy SA token secret that no longer exists.
Diagnose →
kubectl create token api -n prod | cut -d. -f2 | base64 -d 2>/dev/null | jq .iss
vault read auth/kubernetes/config
Fix → When Vault runs in-cluster, drop token_reviewer_jwt so Vault uses its own pod token, and let it validate through the TokenReview API:
vault write auth/kubernetes/config \
kubernetes_host=https://kubernetes.default.svc:443 \
disable_local_ca_jwt=false
For an external Vault, give it a long-lived reviewer token from a kubernetes.io/service-account-token Secret and set issuer correctly.
Prevent → Include a Vault login smoke test in the cluster-upgrade runbook.
More on Secrets management: Vault, External Secrets and SOPS
`vault kv get secret/app/db` returns `Code: 403. Errors: * permission denied` although the policy allows `secret/app/*`BeginnerVault pod restarted and `vault status` shows `Sealed: true`; every app now fails to fetch secretsBeginnerPod stuck in `Init:0/1`; the `vault-agent-init` container logs `error authenticating: ... Code: 403 ... * permission denied`IntermediatePods annotated with `vault.hashicorp.com/agent-inject: true` start without a Vault sidecar, and the app fails on a missing fileBeginnerExternalSecret shows `SecretSyncedError` with `AccessDeniedException: ... is not authorized to perform: secretsmanager:GetSecretValue`IntermediateExternalSecret reports `could not get provider client: SecretStore "aws-sm" is not ready` or `SecretStore.external-secrets.io "aws-sm" not found`Beginner