cilium-cli
cilium-cli copied to clipboard
Enable Prometheus metrics
The Cilium Helm Chart has support for Prometheus metrics. It would be great, if the cilium install
command would have a flag, that enables Prometheus metrics.
Is there any way to get the hubble metrics in prometheus without installing via helm?
For the record I did the following to get metrics after installing with the CLI:
- edit cilium daemonset to add prometheus scrape/port annotations and declare container ports
- create cilium hubble metrics service like here: https://github.com/cilium/cilium/blob/9a7bd38c82c94a31b71fff7e0c1938634af8c3d4/install/kubernetes/cilium/templates/hubble/metrics-service.yaml
- Then:
cilium config set prometheus-serve-addr ":9090"
cilium config set hubble-metrics-server ":9091"
cilium config set hubble-metrics "dns drop tcp flow port-distribution icmp http"
Then I could switch back following the doc, like configuring DNS/L7 metrics as explained here https://docs.cilium.io/en/stable/policy/visibility/#proxy-visibility
So, that is clearly hacky.
Maybe it could be clarified in documentation that the CLI doesn't support metrics configuration (yet), especially as the CLI seem more promoted in the quick-start guide ?
Is this fixed by this PR? https://github.com/cilium/cilium-cli/pull/955 I'm not clear yet on how to use it via CLI if so.
Is this fixed by this PR? #955 I'm not clear yet on how to use it via CLI if so.
Looks like it is done like cilium install --kube-proxy-replacement strict --helm-set-string=k8sServiceHost=xxx.eks.amazonaws.com,k8sServicePort=443,hubble.metrics.enabled="{dns,drop,tcp,flow,icmp,http}"
edit: fixed quotes in command