Google Secrets Manager
Prerequisite
Install External Secret Operator (ESO).
To add secrets from Google Secrets Manager, follow the steps mentioned below :
-
Go to Google cloud console and create a Service Account.
Figure 1a: Create Service Account
Figure 1b: Service Account Creation -
Assign roles to the service account.
Figure 2: Assign Service Account Roles -
Add and create a new key.
Figure 3a: Add Service Account Key
Figure 3b: Create Service Account Key -
Create a Kubernetes secret in the namespace in which the application is to be deployed using base64 encoded service account key.
You can use devtron generic chart for this.
Figure 4: Create Kubernetes Secret -
After creating the generic secret, navigate to
Secretssection of the application and clickAdd Secretto add a new secret.
Figure 5: Add New Secret -
Select
Google Secrets ManagerunderExternal Secret Operator(ESO) from the dropdown ofData type.
Figure 6: Select Google Secrets Manager -
Configure secret.
Figure 7: Configure Secret Settings Key Description secretAccessKeySecretRef.nameName of secret created that would be used for authentication. secretAccessKeySecretRef.keyIn generic secret created for GCP authentication, variable name in which base64 encoded service account key is stored. ProjectIDGCP Project ID where secret is created. secretKeyKey name to store secret. keyGCP Secrets Manager secret name.
Figure 8: Google Secret Example -
Save secret.