Created
December 7, 2020 08:30
-
-
Save esys/ef0d6aa8b8dd2b10f758106a186365df to your computer and use it in GitHub Desktop.
Get shell export variables command from a kubernetes pod environment variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get deploy some-deployment -ojsonpath='{.spec.template.spec.containers[0].env}' | jq -r '.[] | "export " + join("=")' | |
# export VAR1=v1 | |
# export VAR2=v2 | |
# export VAR3=v3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment