Network reachability in k8

From time to time need to test connection between pods and instances.

Better way to run shell in pod and use telnet or traceroute

kubectl run -i --tty busybox --image=busybox --restart=Never -- sh

to run from specific pod shell:

kubectl exec -i -t -n prod-ns wallet-cf48545b6-9t5hd -- sh

to run command from specific pod:

kubectl exec -n prod-ns wallet-cf48545b6-9t5hd -- nc google.com 443

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started