Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 801 Bytes

02-client--for-testing-network-things.md

File metadata and controls

33 lines (22 loc) · 801 Bytes

Client for testing network things

Often you will get questions that require you to test network polices, or look something up in the Kubernetes DNS. There is a one size fits all pod that you can deploy that has all the network testing tools you could possibly want, including

  • curl
  • nslookup
  • netstat
  • dig

and many more.

You run it like so. Commit the image name to memory - this image is a lifesaver!

kubectl run tester --image wbitt/network-multitool

When the pod is running, you can exec into it and run the commands

$ kubectl exec tester -it -- bash

/# curl something
/# nslookup something-else
/# exit

Or run the commands directly if you need to send the results to a file

$ kubectl exec tester -it -- nslookup my-service.default.svc > /opt/some-file.txt