Can you pass an environment variables into kubectl exec without bash -c?
/usr/bin/env exports values passed in key=value pairs into the environment of any program it’s used to invoke. kubectl -n nmspc exec “$POD” — env curIP=123 script01 Note that you should never use $runScript or any other unquoted expansion to invoke a shell command. See BashFAQ #50 — I’m trying to put a command in a … Read more