Configure external secrets for Kubernetes deployments
This guide explains how to integrate Plane with external secret management solutions, enabling secure and centralized management of sensitive configuration data. The examples provided cover AWS Secrets Manager and HashiCorp Vault integrations, but you can adapt these patterns to your preferred secret management solution.
AWS Secrets Manager
-
Create a dedicated IAM user (e.g.,
external-secret-access-user
). You can uncheck Console Access Required. -
Generate
ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
and keep them handy. -
Note the user’s ARN for later use (format:
arn:aws:iam::<account-id>:user/<user-name>
). -
Create IAM policy (e.g.,
external-secret-access-policy
) with the following JSON:Replace
<REGION>
and<ACCOUNT-ID>
with your AWS region and account ID. -
Create IAM role (e.g., external-secret-access-role) with the following trust relationship:
Replace
<IAM-USER-ARN>
with the ARN of the user created in step 1. -
Attach the AWS IAM policy created in step 4 to the IAM role.
-
Create secrets in AWS Secrets Manager with your Plane configuration values. For example, store RabbitMQ credentials with a name like
prod/secrets/rabbitmq
.Key Value RABBITMQ_DEFAULT_USER plane RABBITMQ_DEFAULT_PASS plane123 Follow this pattern to manage all the environment variables in AWS Secrets Manager.
-
Create a Kubernetes secret containing AWS credentials in your application namespace:
-
Apply the following YAML to create a ClusterSecretStore resource:
Replace
<ACCOUNT-ID>
and<IAM ROLE>
with your AWS account ID and the role name created in Step 5. -
Create an ExternalSecret resource to fetch secrets from AWS and create a corresponding Kubernetes secret:
Make sure to set all environment variables in the AWS Secrets Manager, and then access them via ExternalSecret resources in your Kubernetes cluster.
HashiCorp Vault
-
Access the Vault UI at
https://<vault-domain>/
. -
Set up a KV secrets engine if not already configured.
-
Create a secret with your Plane configuration values (e.g.,
secrets/rabbitmq_secrets
). For this example, we’re setting up RabbitMQ credentials:Key Value RABBITMQ_DEFAULT_USER plane RABBITMQ_DEFAULT_PASS plane123 Follow this pattern to manage all the other environment variables in the Vault.
-
Create a Kubernetes secret containing your Vault token in your application namespace:
-
Apply the following YAML to create a ClusterSecretStore resource:
Replace
<vault-domain>
with your Vault server address. -
Create an ExternalSecret resource to fetch secrets from Vault and create a corresponding Kubernetes secret:
Follow this pattern to manage all the environment variables in the Vault, then access them via ExternalSecret resources in your Kubernetes cluster.