Kubernetes annotation for vault not mounting secret file to pod when entry point script is used

4/25/2020

I want to read certificates from vault and install it in the kubernetes pod. I stored the certificates in the vault along with other secret. To filter out the certificate from the vault written an entry point script. So in the script before start up of pod trying to install the certificate.

But found while entry point script starts running vault has not mounted the file in the location. I am using spinnaker deployment pipeline and used annotation for vault to read and mount the file.

Please suggest how this can be achieved.

-- Biswabhusan
hashicorp-vault
kubernetes
kubernetes-pod
spinnaker

1 Answer

4/28/2020

Resolved, vault was running as init container and before start of pod it is mounting the secret. I was pointing to wrong file.

-- Biswabhusan
Source: StackOverflow