Can you use a Kubernetes secret from another namespace?
20 Aug 2024Yes, and no:
- A Pod can only reference a Secret in the same namespace1.
- RBAC can allow a ServiceAccount access to Secrets in other namespaces2.
-
See imagePullReference and envFrom in the Pod API spec. ↩
-
Which is how operators that manage secrets across multiple namespaces work. ↩