I had the need to pipe data into a container being run in kubernetes.
I found out that whatever combination of -i
, -t
or --attach
I specified, the containerised process never received an EOF.
And if it did, all it received was the EOF; not the data I piped into it. Unless I carefully went through all flags, and realised that --restart=Never
solves it:
cat example.yaml | kubectl run -i --image img name --restart=Never