I have a nodejs application which stores variables in environment variables.
I'm using the dotenv module, so I have a .env
file that looks like :
VAR1=value1
VAR2=something_else
I'm currently setting up a BitBucket Pipeline to auto deploy this to a Kubernetes cluster.
I'm not very familiar with kubernetes secrets, though I'm reading up on them.
I'm wondering :
Is there an easy way to send to a Docker-container / kubernetes-deployment all of the environment variables I have defined in my .env
file so they are available in the pods my app is running in ?
I'm hoping for an example secrets.yml
file or similar which takes everything from .env
and makes in into environment variables in the container. But it could also be done in the BitBucket pipeline level, or at the Docker container level .. I'm not sure ...
kubectl apply -k
needs a directory not a file. So It needs to bekubectl apply -k dir
– Cursed