External Secrets Operator connects OpenBao to Kubernetes

External Secrets Operator syncs credentials from OpenBao into Kubernetes Secrets. Keep secret values out of Git and verify that applications pick up rotated credentials.

An API connects to PostgreSQL. GitOps deploys it into the cluster, and OpenBao stores the database password centrally. When the password rotates, the application needs to pick up the new value. The External Secrets Operator (ESO) reads the value from OpenBao and makes it available to the application as a standard Kubernetes Secret. Git holds the reference to the source and the key mapping. Secrets management in the ayedo platform documentation

We use this approach in the ayedo Software Delivery Platform and offer the operator as a managed Kubernetes app in Germany. Start with one service to see how synchronization works and when the application actually starts using an updated value. Managed External Secrets Operator at ayedo

Follow a database password from the store to the Pod

In this example, OpenBao manages the payment service’s credentials in a KV v2 store. A SecretStore in the payments namespace describes the connection to OpenBao and how to authenticate. The ExternalSecret specifies which entry ESO reads and the name it writes to Kubernetes. The Deployment references the resulting Secret as usual. ESO API specification

Assume the SecretStore is named openbao and uses the secret KV mount. This manifest defines the mapping:

apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: payments-db
  namespace: payments
spec:
  refreshPolicy: Periodic
  refreshInterval: 5m
  secretStoreRef:
    kind: SecretStore
    name: openbao
  target:
    name: payments-db
    creationPolicy: Owner
  data:
    - secretKey: DB_PASSWORD
      remoteRef:
        key: payments/db
        property: password

ESO reads the password property from payments/db and writes it as DB_PASSWORD in the payments-db Kubernetes Secret. Five minutes is an example polling interval. The ayedo Polycrate block can install ESO with Helm and create a SecretStore or ClusterSecretStore for OpenBao. It uses the Vault-compatible provider and documents Kubernetes authentication as the recommended method. ESO block in the ayedo Polycrate Hub

Limit read access in OpenBao

With Kubernetes authentication, ESO signs in to OpenBao using a ServiceAccount token. The OpenBao role binds authentication to the intended ServiceAccount and namespace. Its policy determines which entries ESO can read. For the payment service, the policy can limit reads to secret/data/payments/db. The data segment is part of the KV v2 API path used in the policy. In the ExternalSecret, remoteRef.key remains the relative key payments/db. OpenBao integration in the ayedo Polycrate Hub · OpenBao Kubernetes authentication

When several teams use the same ClusterSecretStore, check two permissions. The store configuration controls which namespaces can reference it. The OpenBao policy controls which paths the underlying identity can read. A dedicated SecretStore and OpenBao role make the boundary easier to track for separate applications. After synchronization, the value also exists as a Kubernetes Secret. Cluster access control and encryption of Secrets at rest are therefore part of the operational design. ClusterSecretStore · Kubernetes Secrets

Verify rotation with a successful new connection

When the value changes in OpenBao, ESO writes it to the Kubernetes Secret on a successful sync. What happens next depends on how the Pod consumes the value.

How the Pod reads the Secret How the new value reaches the application
Environment variable via secretKeyRef A newly started container reads the updated value. The team can plan a Deployment rollout.
File in a Secret volume Kubernetes updates the file after a delay. The application must read it again and reopen connections as needed.
Individual file mounted via subPath The existing mount receives no automatic update. Recreate the Pod.

The acceptance test should establish a new database connection. An existing connection can keep working even if the service has yet to load the updated value. During troubleshooting, Ready and status.refreshTime show whether ESO has synced successfully. A successful new login shows whether the application has picked up the value. The team can verify both without printing secret values. Secret updates in Kubernetes · ESO status and sync

Connect your first service with Managed ESO

ayedo operates External Secrets Operator as a managed app on Kubernetes in Germany. Start with a service that has a clearly scoped OpenBao path. Use it to test permissions, the refresh interval, and the rollout during rotation before bringing in more applications. Teams running ESO themselves can also use our Application Support and workshop. Secrets management in the ayedo platform documentation

Want to connect OpenBao to your Kubernetes applications? Talk to us about your secret store and the first service you want to move.