I am trying to set environment variables to kubernetes deployment in following way.
env:
- name: username
value: $(cat /vault/secrets/config.txt | awk ' NR == 2')
For the environment variable value, I am trying to read the first line of a file. But, in application initialization, the environment variable is set as just the text value denoted above without evaluating the cat expression. How to set the environment variable in this scenario properly?. Thank you.