#34;$(kubectl get pod -l app=tcp-echo -n foo -o jsonpath={.items..metadata.name})&#34; -n foo -o jsonpath=&#34;{.status.podIP}&#34;)
$ kubectl exec &#34;$(kubectl get pod -l app=sleep -n foo -o jsonpath={.items..metadata.name})&#34; \
    -c sleep -n foo -- sh -c \
    &#34;echo \&#34;port 9002\&#34; | nc $TCP_ECHO_IP 9002&#34; | grep &#34;hello&#34; &amp;&amp; echo &#39;connection succeeded&#39; || echo &#39;connection rejected&#39;
hello port 9002
connection succeeded
</code></pre></li></ul><div><aside cl