Every Kubernetes team hits the same GitOps wall sooner or later. You wire up Argo CD or Flux, lock down kubectl apply in CI, and feel great about declarative infrastructure — until someone asks: “Where do we put the Postgres password and Stripe API key?”
Commit a standard Kubernetes Secret to Git, and your base64-encoded credentials live in repository history forever. Leave Secret creation out-of-band via manual kubectl commands, and your disaster recovery runbook breaks the moment a cluster is rebuilt.

External Secrets Operator (ESO) — a vendor-neutral CNCF Sandbox project hosted under the Linux Foundation (accepted July 2022) — solves that gap cleanly. You commit an ExternalSecret manifest (which contains only references to secret names, never values) to Git, and ESO’s in-cluster controller pulls the actual values from Google Cloud Secret Manager, AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault into native Kubernetes Secret objects.
(Setting up GitOps delivery first? See GitOps with Argo CD: Automated Kubernetes Deployments before wiring ESO into your ApplicationSet pipelines.)
1. How External Secrets Operator Works (And What It Does Not Do)

ESO installs via Helm in under a minute and introduces two core Custom Resource Definitions (CRDs):
helm repo add external-secrets https://charts.external-secrets.iohelm upgrade --install external-secrets external-secrets/external-secrets \ -n external-secrets --create-namespace --set installCRDs=trueSecretStore/ClusterSecretStore: Defines where the secrets live (GCP, AWS, Vault, Azure, 1Password, Doppler) and how ESO authenticates (Workload Identity, IRSA, Kubernetes auth).ExternalSecret: Lives in your app’s Git repo and maps specific keys from the store into a native KubernetesSecretin that namespace on arefreshInterval.
2. ClusterSecretStore vs. SecretStore: Multi-Tenant Blast Radius
Choosing the wrong store scope is the most common ESO security mistake in production clusters.

SecretStore(Namespaced — Safest Default): Lives inside one namespace (payments-prod) and uses that namespace’s Kubernetes ServiceAccount (bound via Workload Identity / IRSA to onlypayments-prodsecrets in GCP/AWS). Even if a developer instagingcompromises their namespace, they cannot referencepayments-prod’s store.ClusterSecretStore(Cluster-Scoped): Configured once by the platform team so any namespace can reference it. Great for shared platform certs or registry credentials — dangerous for app secrets unless you lock downspec.conditions(namespace labels/names) so arbitrary namespaces cannot pull production database passwords.
3. Production YAML: Keyless Auth (GCP, AWS & Vault)
Never store a GCP JSON key, Vault root token, or AWS AWS_ACCESS_KEY_ID inside a Kubernetes Secret to bootstrap ESO. Use Workload Identity Federation (GKE), IRSA (EKS), or Vault Kubernetes Auth.
Example A: GCP Secret Manager (SecretStore + Workload Identity)
apiVersion: external-secrets.io/v1beta1kind: SecretStoremetadata: name: gcp-secret-manager namespace: payments-prodspec: provider: gcpsm: projectID: "prod-platform-1234" auth: workloadIdentity: clusterLocation: europe-west3 clusterName: gke-prod-eu serviceAccountRef: name: eso-payments-sa # Annotated with iam.gke.io/gcp-service-accountExample B: AWS Secrets Manager (ClusterSecretStore with Namespace Guard)
apiVersion: external-secrets.io/v1beta1kind: ClusterSecretStoremetadata: name: aws-prod-secretsspec: conditions: - namespaces: ["payments-prod", "checkout-prod"] # Prevent cross-tenant reads provider: aws: service: SecretsManager region: eu-central-1 auth: jwt: serviceAccountRef: name: eso-irsa-sa namespace: external-secretsExample C: HashiCorp Vault (SecretStore + Kubernetes Auth)
apiVersion: external-secrets.io/v1beta1kind: SecretStoremetadata: name: vault-backend namespace: payments-prodspec: provider: vault: server: "https://vault.internal:8200" path: "secret" version: "v2" auth: kubernetes: mountPath: "kubernetes" role: "payments-prod-role" serviceAccountRef: name: eso-payments-sa4. Templating v2, Generators, and PushSecret
Basic guides stop at copying 1:1 key/value pairs. In real production apps, you often need to assemble connection strings, generate ephemeral tokens, or push cluster-born credentials back to a cloud vault.
Dynamic Formatting with template.engineVersion: v2
Instead of storing duplicate DATABASE_URL and DB_PASSWORD secrets in your vault, compose them inside the ExternalSecret:
apiVersion: external-secrets.io/v1beta1kind: ExternalSecretmetadata: name: postgres-credentials namespace: payments-prodspec: refreshInterval: 1h secretStoreRef: name: gcp-secret-manager kind: SecretStore target: name: postgres-credentials creationPolicy: Owner # Deletes K8s Secret if ExternalSecret is pruned template: engineVersion: v2 data: DATABASE_URL: "postgres://{{ .db_user }}:{{ .db_pass }}@pg-prod.internal:5432/payments?sslmode=require" data: - secretKey: db_user remoteRef: key: payments-db-user - secretKey: db_pass remoteRef: key: payments-db-passEphemeral Credentials (Generator CRDs) & PushSecret
GeneratorCRDs (generators.external-secrets.io/v1alpha1): Generate randomPasswordvalues,UUIDs,ECRAuthorizationTokens, orVaultDynamicSecrets directly without pre-seeding static credentials.PushSecret(external-secrets.io/v1alpha1): Reverses the flow — pushes a Kubernetes-generated Secret (such as acert-managerTLS certificate or aGeneratorpassword) out into GCP Secret Manager, AWS Secrets Manager, or Vault so external services can consume it.
5. Secret Rotation & Troubleshooting in Production
Here is the trap that bites teams during their first automated secret rotation:
- You rotate the database password in GCP Secret Manager or Vault.
- Within
refreshInterval(e.g.1h), ESO updates the KubernetesSecretpostgres-credentials. - Your running Pods still crash with
authentication failed, because Kubernetes does not reload environment variables (envFrom) in running containers when aSecretchanges.
Two ways to fix rotation cleanly:
- For
env/envFromapps: Run Stakater Reloader in the cluster and annotate your Deployment withreloader.stakater.com/auto: "true"— it hashesSecretdata and triggers a rolling restart whenever ESO writes a new version. - For zero-downtime apps: Mount the
Secretas a volume file (kubelet updates mounted files roughly every 60 seconds, unlesssubPathis used!) and watch the file in your application.
Quick production troubleshooting checklist:
- Check
kubectl describe externalsecret <name> -n <ns>forSecretSyncedError— 90% of failures are missing IAM permissions (roles/secretmanager.secretAccessoron GCP orsecretsmanager:GetSecretValueon AWS) or a blockedClusterSecretStorenamespace condition. - On large clusters (500+
ExternalSecretobjects), avoid settingrefreshInterval: 10severywhere;1hkeeps cloud Secret Manager API quotas and billing predictable, while manual urgent rotations can be forced via annotation (force-sync=$(date +%s)).
6. ESO vs. Sealed Secrets vs. SOPS vs. Secrets Store CSI Driver

| Approach | Governance | Source of Truth | Stored in Git? | Rotation Effort | Best Fit |
|---|---|---|---|---|---|
| External Secrets Operator | CNCF / Linux Foundation | Cloud Secret Manager / Vault | References only (ExternalSecret) |
Automatic (refreshInterval) + Reloader |
Cloud-native K8s (GKE, EKS, AKS, Vault) |
| Bitnami Sealed Secrets | Vendor-led OSS | Encrypted YAML in Git | Yes (asymmetric ciphertext) | Manual re-seal per change | Air-gapped / on-prem without Vault |
| Mozilla SOPS | Community OSS | Encrypted YAML in Git | Yes (KMS/age ciphertext) | Manual re-encrypt + commit | Small teams using Flux native SOPS |
| Secrets Store CSI Driver | Kubernetes SIG-Auth | Cloud Secret Manager / Vault | References (SecretProviderClass) |
Volume mount auto-sync | Strict no-etcd compliance (memory-only tmpfs) |
Bottom line: Pick Secrets Store CSI Driver only if compliance forbids secrets in etcd entirely (and you are willing to mount CSI volumes into every Pod). Pick Sealed Secrets or SOPS for small self-hosted clusters without a cloud secret manager. For production GKE, EKS, AKS, or Vault fleets running Argo CD or Flux, External Secrets Operator is the CNCF standard.
Sources
- CNCF Landscape & Project Profile — External Secrets Operator (Linux Foundation)
- External Secrets Operator — Official Documentation & API Reference
- External Secrets Operator — Advanced Templating v2 & PushSecret
- External Secrets Operator — Google Cloud Secret Manager & AWS Providers
- Kubernetes Documentation — Encrypting Confidential Data at Rest






From the community
Discussion on Mastodon & Bluesky
Replies to this article from the open web, pulled in live. No ads, no tracking scripts.
Reply there — it shows up here automatically.