This article is available in French.
1. Hubble en bref #
La couche d'observabilité de Cilium.
Architecture #
Cilium est un CNI Kubernetes fondé sur eBPF. Puisqu'il voit chaque paquet, il peut aussi produire des flux : qui parle à qui, sur quel port, avec quel verdict (transmis, rejeté), et pour HTTP, DNS ou Kafka, le détail de la requête. Hubble expose ces flux.
2. Installer et observer #
CLI cilium et hubble.
Activation #
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'Bonne Pratique : hubble observe --verdict DROPPED est le premier réflexe quand « le service A ne joint plus le service B » après l'ajout d'une NetworkPolicy.3. Interface et métriques #
Visualiser et alerter.
Hubble UI #
cilium hubble ui ouvre une carte des services d'un namespace, construite à partir des flux réels, avec la liste des flux et leurs verdicts. Idéal pour découvrir les dépendances d'une application inconnue.
Métriques Prometheus #
| Métrique | Usage |
|---|---|
hubble_drop_total | Paquets rejetés par raison (policy, erreur...) |
hubble_dns_queries_total, hubble_dns_responses_total | Volume et erreurs DNS (NXDOMAIN) |
hubble_http_requests_total | Requêtes HTTP par code (si visibilité L7 activée) |
hubble_tcp_flags_total | SYN, RST : connexions refusées |
- 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
Recommended Articles
Understanding the concept of score
The concept of score allows Elasticsearch to rank your documents by relevance during a search.
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...
License consumption types
Understand the evolution of billing in Dynatrace: the difference between the old licensing model ...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Grafana Alloy: Understanding and exploiting the User Interface (UI)
Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...
Grafana Alloy: Introduction and Architecture
Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...
Grafana Alloy: Syntax and Configuration (Alloy Language: River)
As part of a Grafana training or observability training, master the declarative syntax of Grafana...
Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)
Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...
Grafana Alloy: Log Management with Loki
Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...