Networking Cheatsheet
Note
This is not official documentation for AutomationSuite
Glossary of frequently used commands
Check connectivity of a URL
if nc -z -v -w5 loki:3100 &>/dev/null; then echo "connected"; else echo "not able to connect"; fi
Check if IP and Port combo is reachable
telnet 127.0.0.1 8080
Port forwarding a service
kubectl -n rabbitmq port-forward service/rabbitmq 8800:15672
kubectl -n rook-ceph port-forward service/rook-ceph-mgr-dashboard 8800:8443
Check if LB is resolvable via host
curl -m 5 -v -k -i --resolve LB_URL:443:IP_OF_HOST https://LB_URL
Check connectivity in loop
for i in {1..100}; do curl -m 5 -v -k -i --resolve LB_URL:443:IP_OF_HOST https://LB_URL; done
Check if a URL is resolvable via all DNS servers
cat /etc/resolv.conf
nslookup github.com FIRST_DNS_SERVER_IP
nslookup github.com SECOND_DNS_SERVER_IP
Check Connectivity between Nodes (Overlay Test) Network connectivity test can be done via overlay-networking-test Or the same test can be done via Diagnostics tool if it's an airgap environment