4 ms·
Weird - I also had to write this exact thing: Creds () { kubectl exec -ti $(getpod cred-api) -- printenv | grep --color=auto --color=auto RAWDATA
by ghshephard 5y ago
Weird - I also had to write this exact thing:
Creds ()
{
kubectl exec -ti $(getpod cred-api) -- printenv | grep --color=auto --color=auto RAWDATA | tr -d '\r'
}
- j1elo 5y agoSee my "UPDATE" comment; basically the issue seems to be that the output from "docker run" will contain DOS-type line breaks ("\r\n") if running with a pseudo-tty attached, so, with the "-t" argument. If that is not needed (e.g. when scripting) this argument can be dropped, and then the stdout comes clean with Linux style line breaks ("\n"). I don't know about kubectl, but if those "-ti" mean the same as in plain Docker, you could check if dropping the "-t" helps. After all, it looks like you are also scripting, so any kind of interactive input/output would probably be unexpected and undesired in your command.