kubernetes-network-tester

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

README

kubernetes-network-tester

Tests Kubernetes pod-to-pod network connectivity using Prometheus and blackbox-exporter.

Usage

Download from the [Releases][release] page, then run:

./kubernetes-network-tester \
  -numhosts 3
  -resolver $(kubectl get svc -n kube-system kube-dns -o jsonpath='{.spec.clusterIP}'):53 \
  checksvc1 checksvc2 checksvc3

This will create daemonsets and services named checksvc2, checksvc2, and checksvc3. It will also create a Prometheus deployment and service named 'prometheus'.

The Prometheus configuration is designed to have every checksvc pod query every checksvc pod. kubernetes-network-tester will exit with an error if it can't validate every pod-to-pod connection via Prometheus before it times out.

Documentation

Overview

Note: must be built using "-tags netgo" to enforce Go DNS resolver, which allows for properly static linking, but more importantly appears necessary for DNS resolution using a customer dialer. Without netgo, the first name resolution uses our custom Dial method, and thereafter it uses the system resolv.conf settings. Bug?

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL