Skip to content
Branch: master
Find file History
7 authors Initial commit
Co-Authored-By: André Martins <andre@cilium.io>
Co-Authored-By: Glib Smaga <code@gsmaga.com>
Co-Authored-By: John Fastabend <john@cilium.io>
Co-Authored-By: Michi Mutsuzaki <michi@isovalent.com>
Co-Authored-By: Sebastian Wicki <sebastian@isovalent.com>
Co-Authored-By: Sergey Generalov <sergey@isovalent.com>
Co-Authored-By: Thomas Graf <thomas@cilium.io>
Latest commit 4c2e5c2 Nov 18, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
example-apps
images Initial commit Nov 19, 2019
README.md Initial commit Nov 19, 2019
grafana.json

README.md

Setting up Hubble Metrics with Grafana

This tutorial explains how to set up Hubble on Kubernetes with metrics ingested into Prometheus and displayed via Grafana.

Install Hubble

Follow the installation instructions to install Hubble and enable all relevant metrics plugins that you will need. The following metrics configuration example will work well with the example dashboard provided later in this guide:

cd install/kubernetes
helm template hubble \
    --namespace kube-system \
    --set metrics.enabled="{dns:query;ignoreAAAA;destinationContext=pod-short,drop:sourceContext=pod;destinationContext=pod,tcp,flow,port-distribution,icmp,http}" \
    > hubble.yaml
kubectl apply -f hubble.yaml

By using the Helm template, the Hubble DaemonSet is automatically annotated to expose its metrics API to Prometheus:

  annotations:
    prometheus.io/port: "6943"
    prometheus.io/scrape: "true"

Deploy Prometheus & Grafana Stack

Set up Prometheus and Grafana. If you already have a stack running, you can reuse that stack. Otherwise you can deploy a Prometheus and Grafana stack into the cilium-monitoring namespace using the following command:

kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/v1.6/examples/kubernetes/addons/prometheus/monitoring-example.yaml

Deploy the Example Application (Optional)

In order to generate some data, the following example apps can be used. Upon deployment, the apps will automatically generate some network traffic. The example also includes minimal network policies and configures HTTP and DNS visibility.

cd tutorials/deploy-hubble-and-grafana
kubectl create namespace starwars
kubectl apply -f example-apps

Access the Grafana Dashboard

  1. Create a port forwarding rule to access the Grafana Dashboard in your Kubernetes cluster:

     kubectl -n cilium-monitoring port-forward service/grafana 3000:3000
    
  2. Point your browser to localhost:3000

  3. Import the Hubble dashboard tutorials/deploy-hubble-and-grafana/grafana.json

    Import the dashboard

  4. Open the "Hubble" dashboard

    Hubble dashboard

You can’t perform that action at this time.