A SealedSecret works in `staging` but fails in `prod` with `no key could decrypt secret` after being copied there
BeginnerTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → The default scope is strict. The ciphertext is bound to the original name and namespace, so changing either breaks decryption, even on the same controller.
Diagnose → kubectl get sealedsecret db -n prod -o yaml | yq '.metadata.annotations' shows no cluster-wide or namespace-wide annotation.
Fix → Re-seal for the target namespace:
kubectl create secret generic db --from-literal=password=... --dry-run=client -o yaml \
| kubeseal --namespace prod --format yaml > prod/db-sealed.yaml
Prevent → Seal per environment from source values. Use --scope cluster-wide only when you deliberately want the ciphertext portable.
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`IntermediateAfter a cluster upgrade, Vault Kubernetes auth fails for every pod with `error validating token: invalid issuer (iss) claim`AdvancedPods 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`Intermediate