vault-guides
vault-guides copied to clipboard
How can I use template.source instead of contents in case of ConfigMap ?
- My application is already having
application.yml
- I am trying to use
application.yml
as the consul template itself. I think it would be easy migration to the vault. - I declared new
configmap
as follows with consul hcl file as follows"template" = { "source" = "/etc/configforvault/app-resources.yml" "destination" = "/vault/secrets/db-creds" }
- When I deploy the application in k8s it gives following error
2020-08-31T14:08:02.517Z [ERROR] template.server: template server failed to create: error="failed to read template: >open /etc/configforvault/app-resources.yml: no such file or directory" 2020-08-31T14:08:02.517Z [INFO] template.server: template server stopped 2020-08-31T14:08:02.525Z [INFO] auth.handler: authentication successful, sending token to sinks
- I have tried creating
/etc/configforvault/app-resources.yml
invault-0
,vault-agent-injector-XXXXX
and inside application container too, but still getting the same error. Can someone help me here? I am using Kubernetes and vault