I am running python application on K8s cluster in Stateless mode.
Right now we are using configmap & secret to store environment variables data. Using configmap and Secrets adding an environment variable to container os and application get it from os.
app.config['test'] = os.environ.get("test")
To use best practices we are planning to use vault from hashicrop. SO can i populate the config map ? Or direct add the values to container OS so that from os application can get it. No plan to use the volume to populate the variables as using stateless images.
Can someone also please share a document or blog. Thanks in advance.
You can check Vault Agent with Kubernetes. You may have to do some Kubernetes distro specific steps as well.