Kubernetes (EKS) - monitor traffic to pod or through a service

12/6/2019

We have an Kubernetes cluster (AWS EKS) with numerous identical micro workloads. Developers use them for feature testing before it gets to staging. External devices connect to these workloads. Topoligy is really simple:

External device -> Classic Loadbalancer-> NodePort service -> Statefulset

Once developers are done with their work, the workloads are no longer used. I label a workload as not used when there are no connections thru the path described above. Thare are no connections from external device, that is.

Are there any mechanism, plugin or whatever which can monitor/measure inbound traffic to either Kubernetes service or pod? I could, based on the connections number, decide whether to delete the workload.

-- Ɓukasz
aws-eks
kubernetes
metrics
network-traffic

2 Answers

12/9/2019

Most of monitoring tools for traffic monitoring in Kubernetes cluster you can find here: traffics monitoring.

I highly recommend you to use Prometheus.

It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.

There are many option to integrate it with tools eg. Grafana to present and aggregate the collected information.

You can also use Jaeger which is a tracing system released by Uber Technologies; it's used for troubleshooting and monitoring transactions in complex distributed systems.

Take a look on useful article: monitorig.

-- MaggieO
Source: StackOverflow

12/6/2019

Kiali lets you monitor service mesh traffic (if you use Istio).

You could see how much traffic is going to which service and to which pods.

kiali service graph

-- char
Source: StackOverflow