I have a configmap like below.Which I will link to a config file in our application.
apiVersion: v1
kind: ConfigMap
metadata:
name: database-configmap
data:
config: |
dbport=5432
dcname=
dbssl=false
locktime=300
domainuser=
dattserverhost=localhost
conntype=ON-PREM
dbinstance=
dattusessl=false
dbpwd=VrjvBguQ
iisport=80
docountupgrade=false
doreportupgrade=false
dbname=dattdatabase
dattuseiis=false
dbtype=POSTGRESQL
dbusername=postg
dbserver=tgres.database.azure.com
domainpwd=
How to save this in azurekeyvault and get from there during deployment? Individual key/value pairs are stored there in keyvault. But how to achieve this?
I have tried the option provided in the link but it is not showing as normal kubernetes secret. Please see the output below:
kubectl get azurekeyvaultsecret.spv.no/secret-sync -n akv-test
NAME VAULT VAULT OBJECT SECRET NAME SYNCHED
secret-sync testingvaultd sample1
kubectl get secrets -n akv-test
NAME TYPE DATA AGE
default-token-9bsk8 kubernetes.io/service-account-token 3 5m31s