External Secrets Operator: Sync Secrets into Kubernetes
The External Secrets Operator (ESO) acts as a bridge, syncing secrets from an external store like Vault or AWS Secrets Manager into native Kubernetes Secrets. This keeps secrets out of Git and centralizes management.
Why it exists
Storing secrets in Git is a major security risk, and manually managing Kubernetes Secrets is cumbersome and prone to error. Centralized systems like HashiCorp Vault or AWS Secrets Manager solve this at scale, but applications inside Kubernetes need a way to access them securely. External Secrets Operator (ESO) was created to bridge this gap, automating the synchronization from a central source of truth to the cluster.
The mental model
Think of ESO as a trusted courier for your cluster. You give it credentials to an external vault (the SecretStore). Then, you write a manifest (the ExternalSecret) that tells the courier, "Go to this vault, fetch the secret named 'db-password', and deliver it into a Kubernetes Secret named 'my-app-db-creds'." The courier keeps the local copy up-to-date with the vault. Your application only ever talks to the local Kubernetes Secret, unaware of the courier's work.
How it works
ESO extends Kubernetes with Custom Resource Definitions (CRDs). The two most important are SecretStore and ExternalSecret. A SecretStore (or ClusterSecretStore for cluster-wide access) defines how to connect and authenticate to an external provider like Azure Key Vault or Google Secrets Manager. An ExternalSecret resource points to a SecretStore and specifies which secret to fetch from the provider and what the resulting native Kubernetes Secret should be named. The operator's controller runs in the cluster, watches for these resources, fetches the data from the external API, and creates or updates the target Kubernetes Secret.
When to use it
Use ESO when you need to manage secrets centrally for multiple clusters or for both Kubernetes and non-Kubernetes applications. It is essential for a secure GitOps workflow, as it keeps sensitive values out of your repository. It's also ideal for enforcing security policies like secret rotation, as the rotation is handled in the external provider and automatically synced to the cluster.
When not to use it
For simple, single-cluster setups with few static secrets, the overhead of managing an external provider plus the operator might be unnecessary. It also introduces a runtime dependency: if the external provider is down or unreachable when a pod starts or a secret needs refreshing, the operation will fail. This could prevent your applications from starting or receiving updated credentials.
One canonical example
A team uses AWS Secrets Manager to store database credentials. In their Kubernetes cluster, they deploy an ExternalSecret manifest that references a SecretStore configured with an AWS IAM role. The ExternalSecret specifies the remote secret to fetch. The ESO controller uses the IAM role to fetch the JSON secret from AWS, extracts the username and password, and injects them into a Kubernetes Secret named db-creds. The application pod simply mounts the db-creds Secret, completely unaware of AWS.
Interview question
What is the fundamental mechanism by which External Secrets Operator (ESO) enables Kubernetes applications to consume secrets from external providers?
- a.It modifies the Kubernetes API server to proxy secret requests to the configured external provider.
- b.It encrypts secrets within Git repositories, decrypting them only when deployed to a cluster.
- c.It creates and continuously updates native Kubernetes Secret objects with data from external secret management systems.Correct
- d.It provides a direct API endpoint for applications to retrieve secrets from external stores.
Why? this is the answer
ESO acts as a bridge, fetching secrets from external providers and then creating or updating standard Kubernetes Secret objects. Applications then consume these native Kubernetes Secrets. Option D is incorrect because applications interact with the native Kubernetes Secrets, not a direct API provided by ESO to the external store.
Just read this? Test yourself on what you have been reading.
Read the original → external-secrets.io
- #kubernetes
- #secrets
- #devops
- #security
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles