The External Secrets Operator is a Kubernetes operator that integrates external secret management systems, such as HashiCorp Vault. The operator reads information from external APIs and automatically creates Kubernetes secrets.
The installation of the External Secrets Operator consists of several steps:
- Download the Helm chart and configuration file for the External Secrets Operator.
- Fill out the configuration file for the External Secrets Operator.
- Install the External Secrets Operator using Helm in the Kubernetes cluster.
- Configure the elma365-db-connections secret creation parameter in the ELMA365 Helm chart.
Step 1: Download the Helm chart and configuration file for the External Secrets Operator
To install via the internet, obtain the configuration file values-external-secrets.yaml
by executing the following command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/external-secrets > values-external-secrets.yaml
Obtaining the configuration file for offline installation without internet access
helm repo add elma365 https://charts.elma365.tech For more details see Download BRIX images.
tar -xf external-secrets-X.Y.Z.tgz |
Step 2: Fill out the configuration file for the External Secrets Operator
Fill out the values-external-secrets.yaml
configuration file for installing the external-secrets service:
- In parameter
namespace
specify thenamespace
where BRIX is installed. - In parameter
serverVault
replace http://vault-server.vault:8200/ with the address, where the Vault service is accessible. In the example below, the Vault service is installed in in Kubernetes in the vaultnamespace
. - In parameters
kvPath
,keyPath
andkvVersion
specify thekv
secret management mechanism in Vault. - In parameters
authKubernetesRole
andauthKubernetesServiceAccount
specify the service account and role that link the policy to the Kubernetes service account. - In parameters of the
key
section, specify the secret keys in Vault.
// external-secrets settings
external-secrets:
// Configure secret for elma365-db-connections
elma365DBConnections:
// namespace, where BRIX will be installed and the secret will be created (must be created before installation)
namespace: elma365
// vault server address
serverVault: "http://vault-server.vault:8200"
// path where the kv secret mechanism is enabled
kvPath: "secret"
// path to the secret in vault
keyPath: "elma365/db"
// version of the kv secret mechanism
kvVersion: "v2"
// role that link the policy to the Kubernetes service account
authKubernetesRole: "read-secret-elma365"
// service account in the Kubernetes cluster
authKubernetesServiceAccount: "vault-auth"
// secret keys in vault
key:
psqlUrl: PSQL_URL
roPsqlUrl: RO_POSTGRES_URL
mongoUrl: MONGO_URL
amqpUrl: AMQP_URL
redisUrl: REDIS_URL
vahterMongoUrl: VAHTER_MONGO_URL
s3BackendAddress: S3_BACKEND_ADDRESS
s3BackendRegion: S3_REGION
s3Bucket: S3_BUCKET
s3Key: S3_KEY
s3SecretAccessKey: S3_SECRET
s3SslEnabled: S3_SSL_ENABLED
s3Method: S3_UPLOAD_METHOD
s3DumpUrl: S3_DUMP_URL
s3VirtualHostedStyleEnabled: S3_VIRTUAL_HOSTED_STYLE_ENABLED
// number of replicas for high availability
replicaCount: 1
// CRD are applied automatically from the /crds directory
installCRDs: false
...
To connect to a private registry:
// Settings for external-secrets where the format of repository is:
|
Step 3: Install the External Secrets Operator using Helm in the Kubernetes cluster
Install the external-secrets service in a separate namespace
, for example, external-secrets. This Namespace
will be created during installation if it doesn't already exist.
To install via the internet, execute the command:
helm upgrade --install external-secrets elma365/external-secrets -f values-external-secrets.yaml -n external-secrets --create-namespace
For offline installation without internet access, navigate to the directory with the downloaded chart and execute the command:
helm upgrade --install external-secrets ./external-secrets -f values-external-secrets.yaml -n external-secrets --create-namespace
Make sure that the external-secrets service has been created:
kubectl get external-secrets -n elma365
Check the created secret:
kubectl describe secrets elma365-db-connections -n elma365
Step 4: Configure the elma365-db-connections secret creation parameter in the ELMA365 Helm chart
Before installing or upgrading the BRIX Helm chart, you need to disable the creation of the elma365-db-connections
secret with the values-elma365.yaml
configuration file parameters. To do this, set the false
value to false in the parameter db.enabled
in values-elma365.yaml
.
For more details on installing and updating BRIX, see Install BRIX Enterprise and Update version of BRIX Enterprise.
Uninstall the External Secrets Operator chart using Helm in the Kubernetes Cluster
To remove the external-secrets service in the external-secrets namespace
, run the following command:
helm uninstall external-secrets -n external-secrets