SecretStore Resource
You'll learn how to create a namespace-scoped SecretStore that connects Kubernetes to external secret management systems like AWS Secrets Manager or HashiCorp Vault.
What Is a SecretStore?
A SecretStore is a custom resource in the External Secrets Operator that defines how to connect to an external secrets provider. Think of it as a phonebook entry: it doesn't contain the secrets themselves, but tells Kubernetes where to find them and how to authenticate.
The SecretStore lives in a specific namespace and can only be used by ExternalSecret resources in that same namespace. This creates a clear security boundary—team A's SecretStore in namespace app-a cannot be accessed by team B's resources in namespace app-b.
How It Works
When you create a SecretStore, you specify:
- Provider type (AWS Secrets Manager, Vault, Azure Key Vault, etc.)
- Authentication credentials (often referencing a Kubernetes Secret containing API keys or tokens)
- Connection details (region, endpoint URLs, paths)
Here's a simple example structure (conceptual):
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: aws-secret-store
namespace: production
spec:
provider:
aws:
service: SecretsManager
region: us-east-1
The SecretStore validates its connection to the external provider. Once healthy, ExternalSecret resources reference this SecretStore by name to fetch and sync secrets into Kubernetes.
Why Use SecretStores?
Namespace-scoped SecretStores give you separation of concerns—different teams manage their own connections without interfering with others. They're also reusable—multiple ExternalSecrets can use the same SecretStore configuration.
Key Takeaway: A SecretStore is a namespace-scoped configuration object that defines the connection and authentication details for reaching an external secret management system, enabling secure secret synchronization into Kubernetes.