I'm trying to start port-forwarding in the background while suppressing all output. Here is what I've tried:
kubectl port-forward pod-name 1234:1234 > /dev/null 2>&1 &
Yet when I initiate connections, I still see messages like this:
Handling connection for 1234
As I understand it, both standard output and error should be directed to /dev/null.
My belief seems to be confirmed by the silence of this script:
echo "hi" > /dev/null 2>&1 & # test stdout silence
>&2 echo "hi" > /dev/null 2>&1 & # test stderr silence
(Note: I had to run these in a script rather than a shell, to avoid my shell's default output about subshells.)
I don't know what else I can do to suppress the kubectl port-forward output. What am I missing?