What is External Secrets Operator?

External Secrets Operator

External Secrets Operator (ESO) is a Kubernetes-native controller that allows you to securely sync secrets from external secret management systems—like AWS Secrets Manager, HashiCorp Vault, Azure Key Vault, and others—into Kubernetes as native Secret resources. It acts as a bridge between Kubernetes and secret providers, ensuring that sensitive data is not hardcoded or manually managed within the cluster.


History

ESO evolved from the earlier Kubernetes External Secrets project, which was limited in flexibility and extensibility. ESO was redesigned using the Kubernetes controller-runtime framework, introducing Custom Resource Definitions (CRDs) such as ExternalSecret, SecretStore, and ClusterSecretStore. This shift enabled better integration, automation, and scalability across different cloud environments and secret backends.


Why It Matters

Managing secrets securely is critical in any production environment. Kubernetes’ native secrets are stored in etcd and, by default, are only base64-encoded—not encrypted. ESO solves this by allowing secrets to live in purpose-built external secret managers, which offer:

By integrating external secrets with Kubernetes, ESO helps reduce:


Key Concepts and CRDs

Each ExternalSecret is linked to a SecretStore or ClusterSecretStore, which contains authentication and configuration information for the external secret backend.


How It Works

  1. A SecretStore or ClusterSecretStore is defined to authenticate with the external secret manager.
  2. An ExternalSecret CR is created, referencing the store and specifying which secret to retrieve.
  3. ESO reads the external secret, applies any defined templates, and creates or updates a native Kubernetes Secret.
  4. The Secret is kept in sync with the external source based on polling intervals or update triggers.

Use Cases

✅ Centralized Secret Management

Use AWS Secrets Manager, Vault, or Azure Key Vault to manage credentials and expose them only at runtime via Kubernetes.

✅ Multi-Cluster Secret Access

Use ClusterSecretStore to allow teams to pull shared secrets across multiple namespaces or clusters.

✅ Dynamic Secret Syncing

Automatically propagate secret updates from Vault into your Kubernetes apps without redeploying them.

✅ Least Privilege Principle

Configure ESO to access only specific secrets via IAM policies or Vault roles, enforcing granular security controls.


Example: Using ESO with AWS Secrets Manager

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: my-db-secret
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: aws-secrets
    kind: SecretStore
  target:
    name: my-db-secret
    creationPolicy: Owner
  data:
    - secretKey: username
      remoteRef:
        key: prod/db-credentials
        property: username
    - secretKey: password
      remoteRef:
        key: prod/db-credentials
        property: password

This configuration pulls a username and password from AWS Secrets Manager and stores them as a Kubernetes Secret named my-db-secret.


Benefits


Challenges


Supported Providers


Related Tools