1. Hubble in brief #
Cilium's observability layer.
Architecture #
Cilium is an eBPF-based Kubernetes CNI. Since it sees every packet, it can also produce flows: who talks to whom, on which port, with which verdict (forwarded, dropped), and for HTTP, DNS or Kafka, the details of the request. Hubble exposes these flows.
2. Installing and observing #
The cilium and hubble CLIs.
Enabling #
cilium install
cilium status --wait
cilium hubble enable --ui
cilium hubble port-forward & # Relay sur localhost:4245
hubble status# ou avec Helm
helm upgrade cilium cilium/cilium -n kube-system --reuse-values \
--set hubble.relay.enabled=true --set hubble.ui.enabled=true \
--set hubble.metrics.enabled="{dns,drop,tcp,flow,port-distribution,httpV2}" hubble observe #
hubble observe --namespace boutique --follow
hubble observe --verdict DROPPED # paquets rejetés (network policies)
hubble observe --protocol dns --namespace boutique # requêtes DNS
hubble observe --to-pod boutique/checkout --protocol http
hubble observe --from-label app=front -o json | jq '.flow.destination'Good practice: hubble observe --verdict DROPPED is the first reflex when « service A can no longer reach service B » after adding a NetworkPolicy.3. Interface and metrics #
Visualizing and alerting.
Hubble UI #
cilium hubble ui opens a map of a namespace's services, built from real flows, with the list of flows and their verdicts. Ideal for discovering the dependencies of an unfamiliar application.
Prometheus metrics #
| Metric | Usage |
|---|---|
hubble_drop_total | Dropped packets by reason (policy, error...) |
hubble_dns_queries_total, hubble_dns_responses_total | DNS volume and errors (NXDOMAIN) |
hubble_http_requests_total | HTTP requests by code (if L7 visibility is enabled) |
hubble_tcp_flags_total | SYN, RST: refused connections |
- alert: PolicyDrops
expr: sum by (reason) (rate(hubble_drop_total{reason="POLICY_DENIED"}[5m])) > 1
for: 10m
labels: { severity: warning }My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
eBPF best practices for observability
Checklist for adopting eBPF in observability: choosing tools, gradual rollout, agent security, co...
Container network security and Kubernetes networking
Secure the container network: how Docker and Kubernetes networking works, CNI, default-deny Netwo...
Zero-code instrumentation with Grafana Beyla (OpenTelemetry eBPF Instrumentation)
Get RED metrics and HTTP/gRPC traces from any application without changing it: Grafana Beyla and ...
Continuous profiling with eBPF: Parca, Pyroscope and the OpenTelemetry profiler
Continuously profile every process on a host with eBPF: principle, Parca and parca-agent, Pyrosco...
eBPF in production: security, prerequisites and limits
What to know before deploying eBPF agents: privileges and capabilities, kernel versions, managed ...
Kubernetes CNI: Flannel, Calico and Cilium compared
Kubernetes CNI: understand network plugins (Container Network Interface) and compare Flannel, Cal...
eBPF explained: programs in the Linux kernel to observe without instrumenting
What eBPF is, how a program is verified and then run in the kernel, hook points (kprobes, uprobes...
OpenTelemetry Collector: connectors, extensions and observing the Collector
Go further with the Collector: connectors (spanmetrics, servicegraph, count, routing, failover), ...
Diagnosing with bpftrace and the bcc tools
Everyday eBPF diagnostic tools: bpftrace one-liners (system calls, files, latencies), bcc tools (...