I'm using External Secrets Operator to copy secrets from external providers into Kubernetes secrets, and it works great for that.
Now I'd like to copy (& synchronize) a secret from one Kubernetes namespace, into another (or potentially, many).
The problem is, I can't figure out how to configure the ClusterSecretStore and ExternalSecret to do this. I need to be able to specify the origin namespace of the secret in ExternalSecret, but I can't find anywhere in the API spec on how to do this.
I can reference a SecretStore in the same namespace as the ExternalSecret, if I wanted to access secrets in the current namespace. And I can reference a ClusterSecretStore, so that I can use the same Store from any namespace, which sounds good at first... but in the ExternalSecret, I can't find any configuration that allows me to configure "use ClusterSecretStore, and find X secret in Y namespace".
Am I going crazy?? Can anyone point me to the right configuration?
I deployed a ClusterSecretStore for Kubernetes, and it has validated.
I look for the ExternalSecretStore API reference, and I can't find a way (in data or dataFrom sections) to reference a specific namespace for a specific secret. I expected there to be some way to specify the namespace.
The ESO - External Secrets Operator integrates external secret manager to directly use the stored secret to k8s secret.
Based on the docs the
ClusterSecretStoreshall be the cluster scope level ofSecretStorewhereinExternalSecretfetches data on the the secret store.For you to be able to use the same secret in different namespaces thus "replicating same secret" on different namespace inside the cluster,
ExternalSecretshould be configured properly.On the part of the yaml, you should look on the following spec to properly point the
SecretStoreRefto theExternalSecret:Alternatively, you can use Reflector as add on to your cluster