github.com/cilium/cilium@v1.16.2/Documentation/network/servicemesh/envoy-custom-listener.rst (about) 1 .. only:: not (epub or latex or html) 2 3 WARNING: You are looking at unreleased Cilium documentation. 4 Please use the official rendered version released here: 5 https://docs.cilium.io 6 7 .. _gs_envoy_custom_listener: 8 9 ******************* 10 L7 Path Translation 11 ******************* 12 13 This example replicates the Prometheus metrics listener which is 14 already available via the command line option ``--proxy-prometheus-port``. 15 So the point of this example is not to add new functionality, but to show 16 how a feature that previously required Cilium Agent code changes can be 17 implemented with the new Cilium Envoy Config CRD. 18 19 Apply Example CRD 20 ================= 21 22 This example adds a new Envoy listener ``envoy-prometheus-metrics-listener`` 23 on the standard Prometheus port (e.g. ``9090``) to each Cilium node, translating 24 the default Prometheus metrics path ``/metrics`` to Envoy's Prometheus metrics path 25 ``/stats/prometheus``. 26 27 Apply this Cilium Envoy Config CRD: 28 29 .. parsed-literal:: 30 31 $ kubectl apply -f \ |SCM_WEB|\/examples/kubernetes/servicemesh/envoy/envoy-prometheus-metrics-listener.yaml 32 33 This version of the ``CiliumClusterwideEnvoyConfig`` CRD is Cluster-scoped, 34 (i.e., not namespaced), so the name needs to be unique in the cluster, 35 unless you want to replace a CRD with a new one. 36 37 .. include:: warning.rst 38 39 .. code-block:: shell-session 40 41 $ kubectl logs -n kube-system ds/cilium | grep -E "level=(error|warning)" 42 43 Test the Listener Port 44 ====================== 45 46 Test that the new port is responding to the metrics requests: 47 48 .. code-block:: shell-session 49 50 $ curl http://<node-IP>:9090/metrics 51 52 Where ``<node-IP>`` is the IP address of one of your k8s cluster nodes. 53 54 Clean-up 55 ======== 56 57 Remove the prometheus listener with: 58 59 .. parsed-literal:: 60 61 $ kubectl delete -f \ |SCM_WEB|\/examples/kubernetes/servicemesh/envoy/envoy-prometheus-metrics-listener.yaml