Skip to main content

Prerequisites

  • A running Kubernetes cluster with Cilium installed (v1.15.3 or later).
  • Prometheus and Grafana deployed in the cilium-monitoring namespace.
Hubble components (Relay, UI, metrics) are disabled by default. You must enable them via Helm to collect and visualize network flows.

1. Verify Cilium and Hubble Status

First, confirm Cilium is healthy and Hubble is not yet active:
Verify that Grafana and Prometheus are up but not receiving Hubble metrics:
Check that the Cilium Helm repo is configured:

2. Enable Hubble Components

Upgrade your Cilium installation to enable Hubble Relay, UI, and Prometheus metrics:
After a minute, confirm that Hubble Relay and UI are healthy:

3. View Hubble Metrics in Grafana

Navigate to the Grafana dashboard in the cilium-monitoring namespace. You should see Hubble flow metrics such as flows per node, dropped vs forwarded traffic, and protocol distribution:
The image shows a dashboard with various graphs displaying network flow metrics, such as "Flows processed Per Node," "Flow Types," and "Forwarded vs Dropped," over a time period.

4. Expose the Hubble UI as NodePort

By default, the Hubble UI service is ClusterIP. Edit it to use a NodePort for external access:
Replace the spec with:
Exposing services via NodePort can open your cluster to external traffic. Ensure proper firewall rules or security groups are in place.
Now you can access the Hubble UI at <NodeIP>:30000.

5. Test Network Flows with curl

We have a demo application offering two endpoints:
  • /api – restricted to requests with header X-API-KEY: abc123 from pods labeled app=admin.
  • /healthz – open to all traffic.
Create a CiliumNetworkPolicy to enforce this:
Apply the policy and perform valid and invalid requests:
Invalid request (missing API key) will time out:

Observe Metrics for Forwarded vs Dropped Flows

Return to Grafana to see the changes in the “Forwarded vs Dropped” panel and other flow statistics:
The image shows a network monitoring dashboard with various graphs displaying metrics such as forwarded vs. dropped packets, protocol usage, port distribution, and TCP statistics over time.

6. Visualize Live Flows in Hubble UI

Open the Hubble UI at <NodeIP>:30000 to explore live network flows. Click on any flow to see detailed metadata and policy verdicts:
The image shows a network flow diagram with nodes labeled "admin," "default," and "demo," indicating traffic flow to port 80 using TCP and HTTP. The flow details section indicates a dropped connection due to a policy denial.

7. Using the Hubble CLI

You can also use the Hubble CLI for real-time troubleshooting. Exec into a Cilium agent pod:
Stream live flow logs:
Filter flows by namespace, pod, time range, or format:

Conclusion

Cilium Hubble delivers powerful network observability through both a rich UI and command-line interface. Integrate Hubble with Prometheus and Grafana for long-term monitoring or use the hubble CLI for on-the-fly troubleshooting.

Watch Video