Kubernetes with External Secrets
External Secrets Operator (ESO) runs in your Kubernetes cluster, signs in to Secret Manager with an app credential, and copies secrets into ordinary Kubernetes Secrets that your pods use. It reads Secret Manager through ESO’s Vault provider (KV version 2), so no IBEE-specific software is needed. This works with any Kubernetes cluster that can reach your workspace’s address.
How it works
- You store the app credential’s Secret ID in a Kubernetes Secret.
- A SecretStore tells ESO the address, namespace and Role ID.
- Each ExternalSecret names a secret in Secret Manager (for example
payments/db) and the Kubernetes Secret to create. - ESO reads it and creates the Kubernetes Secret, then reads it again at every refresh interval. Each read is a billed operation.
Before you begin
- A cluster,
kubectlandhelm. - An app credential, preferably Read only and limited to the application’s folder (for example
payments), with its Role ID and Secret ID. See Create an app credential. - Your workspace’s address and namespace from Secret Manager → Connect.
Steps
Install External Secrets Operator
Skip this if ESO is already installed.
The examples use the external-secrets.io/v1 API. Check that your ESO version serves it:
Store the Secret ID in the cluster
Create the Secret in the namespace where your application runs (here example-app):
Verify it worked
Read IBEE-managed secrets
Credentials that IBEE products create live in the read-only ibee-managed/ store. Add a second SecretStore with path: ibee-managed and reference it from the ExternalSecret. Only a credential without a folder can read ibee-managed/.
TLS certificates and registry logins
Use a template to create a Kubernetes Secret of a specific type.
A TLS secret, from a secret in Secret Manager with the keys tls.crt and tls.key:
A registry pull secret, from a secret with the keys registry, username and password:
Choose a refresh interval
ESO reads each secret again at every refreshInterval. Each read is a billed operation (₹4 per 10,000), so a short interval costs more and gives little: most applications only pick up a new value when their pods restart.
-
dataFrom.extractreads the whole secret once. Severaldataentries that point at the same secret may each be read separately. -
To pick up a change at once, without waiting for the interval:
-
Values loaded with
envFromorenvchange only when the pod restarts. Secrets mounted as volumes update in place. Tools such as Stakater Reloader can restart a Deployment when its Secret changes.
Shared clusters
A ClusterSecretStore lets every namespace in the cluster read everything its app credential can read. When several teams or applications share a cluster, give each Kubernetes namespace its own SecretStore with its own app credential, limited to that application’s folder.
Troubleshooting
Start with kubectl describe externalsecret <name> -n <namespace> and kubectl describe secretstore <name> -n <namespace>.
