Populate Kubernets Configmap from hashicorp vault

9/24/2019

i want to populate configmaps from data inside vault in kubernetes. I just complete setup of vault and auth method as kubernetes(Service account) and userpass.

Can someone suggest easy way to integrate variables for application ? what to add in yaml file ? if i can populate configmap then i can easily use it to yaml.

how to changes will be affected if variable change on vault.

-- Harsh Manvar
hashicorp-vault
kubernetes

2 Answers

9/24/2019

you can try using Vault CRD, when you create a custom resource of type vault, it will create a secrets using a data from the vault

-- Xavier Adaickalam
Source: StackOverflow

9/24/2019

You can use Vault CRD as Xavier Adaickalam mentioned.

Regarding the subject of variable changes, you have 2 ways of exposing variables inside Pods, using volumes and using environment variables. Volumes are updated automatically when the secrets are modified. Unfortunately, environment variables do not receive updates even if you modify your secrets. You have to restart your container if the values are modified.

-- Alassane Ndiaye
Source: StackOverflow