Integrate External Secrets
Install and configure External Secrets Operator.
The External Secrets Operator (ESO) is a powerful tool for managing secrets in a Kubernetes environment. It bridges the gap between Kubernetes and external secret management systems like AWS Secrets Manager or Azure KeyVault. Here's a detailed overview of the process.
Functionality
ESO syncs secrets from external APIs into Kubernetes, ensuring secure and automated management of secrets.
Key Components
SecretStore: A namespaced Kubernetes resource that connects to an external secret manager.
ExternalSecret: Defines the specific data to be fetched from the external source.
ClusterSecretStore: A global variant of SecretStore for use across multiple namespaces.
Roles and Access Control:
Cluster Operators: Manage the ESO and access policies.
Application Developers: Define ExternalSecrets for their needs.
Prerequisites
Before you begin, make sure that you have the following items installed.
Kubernetes cluster with Argo CD.
Helm for installing ESO.
Kubectl configured for your Kubernetes cluster.
Secrets Manager Access credentials for your secret management system of choice.
Install ESO with Helm
Create an Argo CD Application for ESO:
Define an Argo CD Application to deploy the ESO using its Helm chart. In Harness CD, go to GitOps, and create an application.
Here's a sample YAML:
Install ESO in the
external-secretsnamespace. The installation can be done using Helm upgrade or install command:Verify ESO installation using the following command:
Configure AWS Secret Manager Integration
Create an IAM user in AWS and attach a policy for
SecretsManagerReadWriteaccess:Generate access keys for the IAM user:
Store the access keys in a Kubernetes secret to be used by ESO:
Define a ClusterSecretStore resource that references the Kubernetes secret:
Apply the ClusterSecretStore resource:
Define an ExternalSecret resource to fetch secrets from AWS Secrets Manager:
Apply the ExternalSecret resource to your Kubernetes cluster:
You can now use these secrets in your pods by referencing the Kubernetes Secret object that ESO creates and maintains.
Last updated
Was this helpful?