Creates a pod called echo
that listens on port 8080, echoing everything it receives.
kubectl run echo --image=busybox -- nc -lk -p 8080 -e cat
To test it out, you can do this, to listen on local port 8080 and forward all connections to the echo pod:
kubectl port-forward echo 8080:8080
Then connect:
nc localhost 8080