Syncing Kubernetes secrets with External Secrets Operator

External Secrets Operator copies values from OpenBao, Vault or a cloud secret manager into Kubernetes Secrets on a refresh schedule. This page covers how to scope the stores, configure refresh and decide when the Secrets Store CSI Driver fits better.

On this page

Why teams sync Kubernetes secrets with External Secrets Operator

External Secrets Operator reads secrets from an external system and writes them into Kubernetes Secrets, so workloads can keep consuming the standard Secret objects they already expect. The supported providers named in the project documentation include AWS Secrets Manager, HashiCorp Vault, Google Secrets Manager, Azure Key Vault, IBM Cloud Secrets Manager and CyberArk Secrets Manager. OpenBao, the community fork of Vault, is reached through the same Vault-style integration path, but the team should confirm the exact provider configuration against the External Secrets Operator documentation before building on it. The operator is built from the ExternalSecret, SecretStore and ClusterSecretStore resources, and it can also push values back to providers, which is covered in the sections that follow.

The sync design has to account for where the values end up. Kubernetes Secrets are stored unencrypted in etcd by default, so a copy created by the operator sits in etcd exactly like a Secret written by hand. Before go-live, confirm that encryption at rest is enabled for Secret resources on the API server, and that RBAC limits who can get, list and watch Secrets in the namespaces where synced objects live. Without those two controls, moving the source of truth to an external manager only changes where the secret originates, not who can read it inside the cluster.

Teams should weigh this sync model against the Secrets Store CSI Driver before committing to either. Syncing creates a long-lived Kubernetes Secret that any permitted workload or user can read, which suits applications that need environment variables or existing Secret-based configuration. Where the secret should never persist as a Kubernetes object, or where mounting files at pod start is the better fit, the CSI approach may be preferable. Record the decision per workload class, and agree with the security team who owns the external store, the refresh policy and the audit trail before the first ExternalSecret is created.

What you need before installing External Secrets Operator

External Secrets Operator only works as well as the platform beneath it. The cluster version, the secret manager, the authentication path, encryption at rest and access rules each determine whether synced values stay protected. Confirm these five items before you install the operator into a cluster.

A supported Kubernetes version

Start with the minor version your cluster runs and its support window. The Kubernetes project maintains the three most recent minor releases, so check the Kubernetes releases page for the current list and end-of-life dates. A cluster on an unsupported minor line will need an upgrade before the operator's own supported versions can be relied on. Confirm the exact External Secrets Operator chart version and its Kubernetes compatibility in the ESO documentation for your environment.

Minor releases maintained
3
Kubernetes releases

A reachable secret manager endpoint

ESO reads from an external system, so the cluster must reach its API endpoint over the network. Decide which store holds the secrets: OpenBao, HashiCorp Vault or a cloud secret manager. Confirm that the endpoint is reachable from the pods that will run the operator, that TLS certificates are trusted by the cluster, and that the store is itself highly available, because a store outage stops refresh but does not remove existing Secrets.

Provider authentication method

Decide how ESO proves its identity to the store. Options include a Kubernetes auth method on OpenBao or Vault, a cloud workload identity, or a static credential held in a Kubernetes Secret. Static credentials are the simplest to set up but become a secret that also needs rotation and protection. Prefer a method that issues short-lived tokens bound to a service account, and confirm which methods your chosen provider supports in the ESO documentation.

Encryption at rest for etcd

Kubernetes Secrets are stored unencrypted in etcd by default. Synced values land in those same objects, so encryption at rest must be configured before ESO writes production credentials. Check the cluster's encryption configuration, confirm that the key management setup is documented and tested, and verify that etcd backups are also encrypted. Without this control, a copy of the etcd data exposes every synced value.

Secrets good practices

RBAC model for synced Secrets

Define who can read the Kubernetes Secrets that ESO creates. Restrict get, list and watch on Secrets to the service accounts and groups that need them, and keep create and update rights for the operator's own service account. Review ClusterSecretStore permissions separately, because a cluster-wide store can be referenced from any namespace. Write these rules down before the first sync so that audit evidence matches the design.

How values move from the secret manager into a pod

The flow starts in the external secret manager, which stays outside the cluster trust boundary. A SecretStore or ClusterSecretStore holds the provider address and the authentication method, and an ExternalSecret sets the refresh behavior and names the Kubernetes Secret to create. External Secrets Operator writes that Secret through the cluster API, where it is stored in etcd, and the pod then consumes it. Check which party can read each hop, and remember that the generated Secret is still stored in etcd, so encryption at rest and RBAC on the Secret still apply.

Values flow from the external manager through the operator into etcd and then into the pod.

SecretStore or ClusterSecretStore: choosing the scope

External Secrets Operator reads secrets from an external provider through a store resource. A SecretStore is namespaced: an ExternalSecret can only reference a store in its own namespace, so the provider connection and its credentials are visible only within that boundary. A ClusterSecretStore is cluster-scoped and can be referenced from an ExternalSecret in any namespace. The two resources use the same provider configuration, so the difference lies in who can reach the store and what credentials it holds, not in what it can fetch.

  • Namespace boundary: a SecretStore lets only workloads in its namespace pull through that connection.
  • Cluster-wide reach: a ClusterSecretStore lets any namespace that can create an ExternalSecret use the same provider credentials.
  • Credential placement: each store points at credentials in Kubernetes, so the Secret holding them sits in the store's namespace or, for cluster stores, in the operator's configured namespace.
  • Same provider, different blast radius: a compromised cluster store exposes every path its credentials allow, while a namespaced store exposes only the paths its credentials allow for that team.
  • Confirm in the release you deploy: check the current External Secrets Operator documentation for the exact fields that define these resources.

Before choosing, list the provider paths each team needs and the credentials that reach them, because the scope decision is really a credential decision.

Configuring the sync from store to Kubernetes Secret

This sequence connects one secrets backend to one cluster so that a value stored in OpenBao, Vault or a cloud secret manager appears as a Kubernetes Secret that updates on a refresh interval. Each step ends with a check the operator team can run before any workload depends on the synced value.

  1. Install the operator into the cluster

    The platform team installs External Secrets Operator into a dedicated namespace, using the Helm chart or manifests from the project's documentation pinned to a version the team has reviewed. Keep the operator's own service account and its RBAC narrow, since it will hold permission to read from the backend and write Secrets. The step is complete when the operator Deployment is available and its pods are running, and the custom resource definitions for ExternalSecret, SecretStore and ClusterSecretStore are present in the cluster. Confirm the chart version and upgrade path with the project before installing in a regulated environment.

  2. Create backend authentication for the chosen store

    Decide how the operator proves its identity to the secrets backend. For OpenBao or Vault, the Kubernetes auth method lets the operator's service account log in, while AppRole suits workloads that run outside the cluster or need a credential the platform team can rotate separately. Create the role in the secrets backend with a policy that allows read access only to the paths this cluster needs, and store any AppRole secret ID in a Kubernetes Secret that the operator reads. The step is complete when a test login from the operator's identity succeeds and returns a token scoped to the intended paths. Confirm the exact auth configuration keys against the backend's current documentation for your version.

  3. Define the SecretStore or ClusterSecretStore

    Create a SecretStore when only one namespace should reach the backend, or a ClusterSecretStore when several namespaces share the same connection and the platform team wants to control it centrally. The store records the backend address, the auth method from the previous step and the references to credentials. Apply the resource and check its status condition, which should report that the store is valid and ready. A ready status proves the operator can reach the backend and authenticate, but it does not prove that any particular secret path exists, so the next step tests that.

  4. Create an ExternalSecret with a refresh interval

    Write an ExternalSecret that names the store, the remote path or key, the target Kubernetes Secret name and the properties to copy into it. Set refreshInterval to a value the security and application owners agree on, because it sets how long a changed value can take to reach the cluster and how often the operator calls the backend. Use an explicit target name and map only the keys the workload needs. Apply the resource and describe it, looking for a Ready condition and a recent sync time in the status. A failed sync shows the reason in the same status block, which is the first place to look when the Secret does not appear.

  5. Verify the generated Secret and its keys

    Confirm that the operator created the target Secret in the same namespace as the ExternalSecret, and list its keys without printing their values into shared logs or terminal history. Compare the key names and count with the mapping in the ExternalSecret so that no property is missing or misnamed. Check that the Secret carries the labels and owner reference the operator sets, which show that the operator manages it and that deleting the ExternalSecret will clean it up. The step is complete when every expected key is present and a workload pod in the namespace can mount or read it under the RBAC rules the team has set.

  6. Test rotation of one value

    Change one value in the backend, such as a test key in a non-production path, then wait for the refresh interval to pass or trigger a sync if the operator version supports it. Read the ExternalSecret status to see the new sync time, and confirm that the Secret's value changed for that key only. Record the time between the backend change and the cluster update, since that is the real propagation delay for this configuration and the figure that application owners need. Workloads that read the Secret as environment variables will not see the new value until they restart, so confirm how each consumer picks up changes before relying on rotation.

Refresh intervals and push secrets: what changes in production

The refresh interval on an ExternalSecret decides how long a rotated value in your secret manager can take to reach the Kubernetes Secret it feeds. External Secrets Operator polls the provider on that schedule and rewrites the target Secret when the value has changed, so a rotation done at 10:00 becomes visible in the cluster only after the next poll. Set the interval per secret, not once for the whole cluster. Short intervals suit credentials that must be revoked quickly, while long intervals suit stable configuration. Every poll is a read against OpenBao, Vault or a cloud secret manager, so a cluster with many ExternalSecrets at a short interval multiplies load on the provider and on the operator's API quota. Ask the provider team what read rate they will accept, and confirm the rate limits of your chosen backend before you pick values. Also confirm how the operator behaves when the provider is unreachable, because a stale Secret is usually preferable to an empty one.

Updating a Kubernetes Secret does not mean the application has the new value. Environment variables are read once when a container starts, so a pod using secretKeyRef keeps the old password until it restarts. Secrets mounted as volumes are eventually updated on disk, but the application must reread the file, and many clients do not. Plan a rollout mechanism for each workload, such as a checksum annotation on the pod template, a reloader controller or an application that watches its files. Test the rotation path in a non-production namespace before you rely on it for a credential rotation, and record who restarts what when a rotation is urgent.

PushSecret works in the other direction: it takes a value held in a Kubernetes Secret and writes it to a provider. This is useful when a cluster generates a credential, such as a certificate or a bootstrap token, that other systems need to read from the central store. It also creates governance questions that a pull-only setup avoids. The operator's service account needs write permission on the provider path, so a compromise of the cluster can alter central secrets, not just read them. Decide which namespaces may create PushSecrets, which provider paths they may target, and who owns deletion behavior. Confirm the exact fields and supported providers for your operator version in the External Secrets Operator documentation before you write policy around them.

Mapping provider paths, keys and Kubernetes Secret fields

This table traces one secret from its provider path or key to the Kubernetes Secret name, key and namespace it lands in, and names the store, auth method and refresh interval each field belongs to. Read each row as a question to answer for your backend before writing the ExternalSecret manifest. The main takeaway is that the store decides who can read, the ExternalSecret decides what lands where, and the refresh interval decides how stale a value can get.

FieldWhere it is setWhat to mapWhat to confirm
Provider path or keyExternalSecret remoteRef (key, property, version)The secret path in the manager, for example a KV path or a cloud secret name, plus the property inside itExact path syntax and whether a property or version field is supported for your provider in the ESO docs
Kubernetes Secret nameExternalSecret target.nameThe Secret the operator creates or updates, one per ExternalSecret unless you use templatingWhether an existing Secret with the same name is overwritten, and which workloads reference it
Kubernetes Secret keyExternalSecret data entries (secretKey)The key inside the Secret that holds each provider property, so pods can read it by nameThat the key names are valid for how your application reads environment variables or files
NamespaceExternalSecret metadata, and the store kind chosenThe namespace where the ExternalSecret and its target Secret live, which must match the namespace of consuming podsWhether a ClusterSecretStore is allowed to serve this namespace under your policy
Store name and kindSecretStore (one namespace) or ClusterSecretStore (cluster-wide)Which backend connection the mapping uses, with a store per provider and environmentConditions that limit a ClusterSecretStore to approved namespaces
Auth methodStore provider block (for example Kubernetes, AppRole, JWT or token references)The identity the operator presents to the manager, scoped to read only the paths this mapping needsWhich auth methods your provider supports and how the policy is bound to the service account
Refresh intervalExternalSecret refreshIntervalHow often the operator re-reads the provider and updates the Secret, set per mapping rather than globallyThe provider rate limits and the staleness your application can tolerate after a rotation

Hardening the synced secrets

Syncing secrets into Kubernetes moves the risk from the provider into the cluster, where Secrets are readable by anyone with the right API access. The controls below cover where the values sit, who can read them, which namespaces can pull them, how the provider is authenticated and what gets logged, so each layer can be checked during review.

Encrypt Secrets at rest in etcd

Kubernetes stores Secrets unencrypted in etcd by default, so every value that External Secrets Operator writes is readable from an etcd snapshot or backup unless encryption at rest is configured. Confirm that the API server uses an encryption configuration for the Secrets resource, that the key material is held outside the cluster where your platform allows it, and that etcd backups are encrypted too. Check the setting on every cluster, including the ones built for testing.

Kubernetes Secrets practices

Restrict list and watch on Secrets

Any subject that can list or watch Secrets in a namespace can read every value in it, even without a get verb on each object. Bind Roles that grant only the verbs a team needs, keep the External Secrets Operator service account limited to the namespaces it writes into, and review ClusterRoleBindings that grant Secrets access cluster-wide. Ask your admins to produce a list of subjects with these verbs before go-live.

Limit ClusterSecretStore references

A ClusterSecretStore is usable from any namespace the operator is allowed to read, which makes it a broad grant to one provider account. Prefer namespaced SecretStore resources for workloads that need only their own secrets, and where ClusterSecretStore is required, use namespace selectors or conditions so that only named namespaces can reference it. Confirm the selector behavior in your operator version before relying on it.

Scope provider credentials

The credential that External Secrets Operator uses to reach the provider decides how far a compromise travels. Create a dedicated provider identity per store, grant it read access only to the paths or secret prefixes it needs, and avoid root or administrator tokens. Where the backend supports Kubernetes or OIDC authentication, prefer short-lived tokens bound to the operator's service account over static credentials stored in a Secret.

Audit reads from the provider

Kubernetes audit logs record who changed a Secret, but a sync reads from the provider on the operator's behalf, so the provider audit log is the record of value access. Enable audit devices on OpenBao or Vault, or the provider's own logging on a cloud secret manager, and alert on unusual read volume or reads from unexpected identities. Confirm log retention and who can view these logs, because they name secret paths.

Rotate and revoke on a schedule

A synced copy stays valid until the next refresh or until someone deletes it, so rotation at the provider does not automatically invalidate old values held in the cluster. Set refresh intervals that match your rotation policy, test that a rotated value reaches the Kubernetes Secret and the consuming pods, and document how a revoked provider credential is detected and what happens to workloads that depend on it.

When the Secrets Store CSI Driver is the better fit

The core design difference is where the secret ends up. The Secrets Store CSI Driver mounts secret material into a pod as a volume through a provider plugin, and by default it does not create a Kubernetes Secret object. ESO does the opposite: it reconciles an ExternalSecret into a native Kubernetes Secret that workloads then read as environment variables or volume files. That difference matters for audit and exposure. A CSI mount keeps the value out of etcd unless you explicitly enable secret syncing, while an ESO Secret is stored in etcd and is readable by anyone with list or get access in that namespace, so the RBAC and encryption at rest controls covered earlier in this page apply to it directly. Confirm with your compliance team whether that etcd footprint is acceptable for each class of credential.

Choose ESO when workloads, Helm charts or third-party operators expect a standard Secret, when many consumers read the same value, or when you need the Secret to exist before a pod starts. It also fits cases where you want ESO's push secrets or generators. Choose the CSI driver when the workload can read files from a mounted path, when pods should not generate a copy of the credential in the cluster, or when rotation should reach a running pod through the mount rather than through a new Secret. Be aware that CSI mounts depend on the pod starting, and the mounted content changes only as the driver refreshes it, so confirm how your application reloads files and how it behaves when the provider is unreachable.

The two approaches are often combined. A common pattern is to mount a secret through CSI for an application that needs file-based access, and to sync a narrow subset through ESO for a component that requires an environment variable. Doing this doubles the places a credential can live, so document which path owns each secret and which team rotates it. The sibling page on Kubernetes secrets from OpenBao and Vault with the Secrets Store CSI Driver covers provider choice, Kubernetes auth in the secrets store and rotation for the CSI route, so use it for the mount-based design rather than repeating that work here.

Why ExternalSecret status shows an error

This table lists the failures that most often leave an ExternalSecret in an error or stale state, with the likely cause and the fix for each. Check the ExternalSecret and its referenced SecretStore conditions first, then work through the row that matches the message. The main takeaway is that most failures sit in authentication, scope or trust settings rather than in the synced data itself.

Symptom or failureLikely causeFix
Authentication rejectedWrong auth role, expired token or revoked credential in the SecretStoreConfirm the role bound to the Kubernetes service account, then renew or re-issue the token or credential the store uses
SecretStore not readyStore cannot reach the provider or its auth config is incompleteDescribe the SecretStore and read its status conditions, then fix the endpoint, auth block or network path before retrying
Path or key not foundThe remoteRef path or property name does not match what the provider holdsCheck the secret path and key in the provider, noting that KV version differences can change the path format
Namespace not permittedA ClusterSecretStore is restricted by namespace conditions that exclude the ExternalSecret's namespaceUpdate the ClusterSecretStore namespace selector or create a namespaced SecretStore for that team
TLS trust failure with a private endpointThe operator does not trust the CA that signed the Vault or OpenBao certificateMount the internal CA bundle and reference it in the store's TLS settings, then confirm with a test read
Values stale after rotationRefresh interval is longer than the rotation test windowShorten refreshInterval for the test ExternalSecret, and confirm the interval you need for production with your team
Secret readable but unprotected at restetcd encryption at rest is not enabled, so synced values sit unencrypted in etcdEnable encryption at rest for Secret resources in the API server configuration and verify it before relying on synced values

Questions teams ask before syncing secrets

What does syncing secrets with External Secrets Operator cost and what drives the effort?

The software is open source, so the cost is the work to design and build the integration, plus the people who run it afterward. The main effort drivers are the number of SecretStores and ClusterSecretStores, how many backends you connect (for example OpenBao, HashiCorp Vault and a cloud secret manager), which authentication method each store uses, and how many rotation and refresh rules you need. Each new store and auth method adds design, testing and documentation. Ask any quote to list these counts separately, the one-time build work and the recurring upgrade and support work, and to state who holds the secret manager and cluster credentials after handover.

How long does a first External Secrets Operator integration take?

Duration depends on scope more than on the operator itself. A single cluster reading from one secret store with a few namespaces is a small job. Work grows when you add multiple clusters, several backends, a ClusterSecretStore shared across teams, push secrets back to a provider, or a secret manager that does not yet have the paths and policies organized. Before you agree a timeline, confirm which secret stores are in scope, which teams own each secret path, whether the secret manager is already running, and whether change approvals or a test environment must come first. A written scope is the only reliable basis for a date.

What must our team provide before a secrets sync project starts?

Plan for four kinds of access and decisions:

  • Cluster admin access to install the operator, create namespaces, and configure RBAC for the ExternalSecret and SecretStore resources.
  • Administrator access to the secret manager, so the auth method, policies and mount paths can be created.
  • A named owner for each secret path, who approves which workloads may read it.
  • Agreement on the refresh interval and rotation rules for each secret type.

Confirm these with your identity and security teams early, because approvals often set the pace of the project.

Can an in-house platform team set up External Secrets Operator alone?

A team that already runs Kubernetes, manages its own RBAC and operates a secret manager can usually build a basic integration without outside help. The harder parts are reviewing the trust boundary, choosing between a SecretStore and a ClusterSecretStore, and deciding whether Kubernetes Secrets are the right delivery method at all. Kubernetes stores Secrets unencrypted in etcd by default, so encryption at rest and least-privilege list and watch access must be configured as part of the work. Check whether your team has capacity for the testing, documentation and the upgrade cycle that follows, since the Kubernetes minor releases arrive about three times per year.

When should we use the Secrets Store CSI Driver instead of External Secrets Operator?

External Secrets Operator creates Kubernetes Secrets, which suits workloads that read environment variables or Secret volumes and that need the value stored in the cluster. The Secrets Store CSI Driver mounts secrets into pods directly from an external store, which suits teams that want the value to avoid becoming a Kubernetes Secret object. Kubernetes' good practices guidance names the CSI route as one way to use external stores. Choose based on how each application consumes secrets, how rotation must behave, and what your auditors expect to see in cluster objects. Some organizations use both for different workloads, which adds design and operations work.

OpenBao or HashiCorp Vault: which should we choose for our secret store?

The choice depends on license terms, edition needs and how much you want to depend on one vendor. OpenBao is an open source fork of Vault under the MPL-2.0 license, managed by the Linux Foundation's OpenSSF, and it is a Sandbox project. HashiCorp announced in August 2023 that future releases would move to the Business Source License 1.1, and IBM completed its acquisition of HashiCorp in February 2025. Vault Enterprise features need a license. Confirm with your legal team which license terms fit your use, which features you require (for example performance replication, HSM support or FIPS compliance), and whether your existing Vault data can migrate. The OpenBao migration guide was tested only against Vault 1.14.1 Community Edition, so validate your version and edition before you commit.

What happens when a secret changes or the secret manager goes down?

External Secrets Operator refreshes Kubernetes Secrets at the interval you configure, so a rotated value reaches the cluster after the next refresh. Applications may still need a restart or a reload to read the new value, which depends on how each workload consumes it. If the secret manager is unavailable, existing Kubernetes Secrets remain in the cluster, but updates stop until connectivity returns. Test these cases in a non-production cluster, confirm your recovery steps with the secret manager's own high availability design, and agree on alerting for failed syncs before go-live.

Does DeployOpen handle the whole secrets sync setup, and what do we receive?

DeployOpen implements self-hosted open-source platforms inside your own infrastructure, so the engagement covers planning, implementation, hardening, documentation and support for the platform you choose. For this integration, that can include the operator install, store design, RBAC, refresh and rotation rules, and handover notes. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask for the written scope to name each store, backend, auth method and namespace included, and to list what you receive at handover.

How DeployOpen scopes the secrets integration

DeployOpen scopes the External Secrets Operator work as a fixed-scope engagement with the store design agreed in writing before any cluster change is made. The first step is a design review of which secret backend is authoritative (OpenBao, HashiCorp Vault or a cloud secret manager), how the Kubernetes auth method or token path is established for each cluster, and whether each team needs a namespaced SecretStore or a shared ClusterSecretStore. Those choices decide who can reference which backend, so they are settled first and written into the scope. The client's own platform, security and application owners are needed for that review, and the scope should name them.

Once the design is approved, DeployOpen installs and configures External Secrets Operator inside the client's own clusters and accounts, then tests the behavior that matters in production. Tests cover refresh intervals on ExternalSecret resources, what happens to existing Kubernetes Secrets when the backend is unreachable or a path is removed, how rotated values reach workloads, and whether any push secret configuration behaves as the design intends. The engagement then documents ownership of each store and secret path, the runbook for failed syncs, and the steps to rotate the credentials the operator itself uses. Clients should ask for each of these as a named deliverable, with the retest results attached.

Retainers are available after handover for operator upgrades, store and provider changes, and ongoing support, which suits teams that expect new backends or credential policies over time. Before requesting a quote, confirm which backend version your organization will run and whether its license terms affect your plan, since HashiCorp Vault and OpenBao differ on licensing. A written scope should state the clusters in scope, the backends and namespaces involved, the test cases and the handover owners, so the quote can be compared on the same basis as an internal build.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.