In this post, we will see how to resolve How to mount Vault secret as a file in Kubernetes?
Question:I’m using Hashicorp Vault in Kubernetes. I’m trying to mount secret file into main folder where my application resides. It would look like that:
/usr/share/nginx/html/.envwhile application files are in
/usr/share/nginx/html. But the container is not starting because of that. I suspect that that
/usr/share/nginx/htmlwas overwritten by Vault (annotation:
vault.hashicorp.com/secret-volume-path). How can I mount only file
Best Answer:I tried to replicate the use case, but I got an error
.envin the path, here is the config
commandof the desired container, for this use case, i used
If you have better answer, please add a comment about this, thank you!