Search code examples
kubernetesmonitoringnginx-ingress

Kubernetes: Monitoring throughput of each Ingress


We're having a bare metal K8s cluster with an NGINX Ingress Controller.

Is there a way to tell how much traffic is transmitted/received of each Ingress?

Thanks!


Solution

  • Ingress Controllers are implemented as standard Kubernetes applications. Any monitoring method adopted by organizations can be applied to Ingress controllers to track the health and lifetime of k8s workloads. To track network traffic statistics, controller-specific mechanisms should be used.

    To observe Kubernetes Ingress traffic you can send your statistic to Prometheus and view them in Grafana (widely adopted open source software for data visualization).

    Here is a monitoring guide from the ingress-nginx project, where you can read how do do it step by step. Start with installing those tools.

    To deploy Prometheus in Kubernetes run the below command:

    kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/prometheus/
    

    To install grafana run this one:

    kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/grafana/
    

    Follow the next steps in the mentioned before monitoring guide.

    See also this article and this similar question.