Search code examples
namespaceskubernetes

Is there a way to share secrets across namespaces in Kubernetes?


Is there a way to share secrets across namespaces in Kubernetes?

My use case is: I have the same private registry for all my namespaces and I want to avoid creating the same secret for each.


Solution

  • Secret API objects reside in a namespace. They can only be referenced by pods in that same namespace. Basically, you will have to create the secret for every namespace.

    For more details, see this: Kubernetes Documentation / Concepts / Configuration / Secrets