Example Use-Case
This example use-case aims to show all of the core abilities of Azure KeyVault Secret Operator. Please find the use case scenario below and then apply all of the steps.
Use-Case Scenario
SuperStore is an e-commerce platform which uses Kubernetes for its workloads. Company plans to keep credentials in Azure KeyVault as listed below;
Secret Name | Description |
---|---|
catalogdb | MSSQL connection string as ready to use directly |
amqp-username | Username of AMQP product |
amqp-password | Password of AMQP product |
docker-config-json | Private docker registry credential for pulling images. |
Secrets Need To Be Created
However, every namespace in the Kubernetes needs different kubernetes secret. Following pseudo secret yamls should be applied by operator.
Below secret should be present in superstore-test namespace.
...
kind: Secret
name: catalog-api
data:
catalogdb-connectionstring: "{catalogdb}"
Below secret should be present in every namespace which ends with “test”
...
kind: Secret
name: amqp
data:
amqp-connectionstring: "amqp://{amqp-username}:{amqp-password}@brokersvc:5672/"
Below secret should be present in every namespace which doesn’t include “kube”
...
kind: Secret
name: docker-registry-credential
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: "{docker-pull-secret}"