use kubectl to exec into a pod

kubectl exec -it <pod name> -n <namespace> -- /bin/sh

Run the following command from with a pod

curl http://ifconfig.co