traffic-monitor

module
v0.0.0-...-7c47631 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0

README

Introduction

Traffic-Monitor is a network sniffer program deployed on each node to collect traffic statistic information bewteen k8s pods. Currently only http traffic can be captured.

The captured traffic statistic information will be stored in build-in traffic-prometheus service.

Deploy traffic monitor

git clone https://github.com/luguoxiang/kubernetes-traffic-manager.git
helm install --set monitor.enabled=true --name kubernetes-traffic-manager helm/kubernetes-traffic-manager

Deploy sample application

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.0/samples/bookinfo/platform/kube/bookinfo.yaml

Generate traffic

kubectl apply -f deploy/ingress.yaml
INGRESS_HOST=`kubectl get svc traffic-ingress -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'`
while true; do curl http://${INGRESS_HOST}/productpage; sleep 1;done

Get traffic from promethues

curl ${INGRESS_HOST}/api/v1/query?query=requests_total|jq

Show traffic by vizceral

kubectl apply -f deploy/vizceral.yaml
browse http://${INGRESS_HOST}/static/index.html

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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