# Prometheus metrics routing

**URL:** <https://community.traefik.io/t/prometheus-metrics-routing/8312>\
**Category:** Traefik v2\
**Tags:** metrics, kubernetes-ingress\
**Created:** [October 25, 2020, 1:15am UTC](https://community.traefik.io/t/prometheus-metrics-routing/8312 "2020-10-25T01:15:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davosian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/davosian/32/2401_2.png) [@davosian](https://community.traefik.io/u/davosian)\
**Post date:** [October 25, 2020, 1:15am UTC](https://community.traefik.io/t/prometheus-metrics-routing/8312/1 "2020-10-25T01:15:00Z")

</div>

I am struggling to get my metrics exposed on Kubernetes with Traefik 2.3.2. This is the CRD configuration I am using:

```yaml
      containers:
        - name: traefik
          image: 'traefik:v2.3'
          args:
            - --api
            - --api.dashboard
            - --entrypoints.dashboard
            - --accesslog=true
            - --entrypoints.web.Address=:80
            - --entrypoints.websecure.Address=:443
            - --providers.kubernetescrd
            - --providers.kubernetesingress
            - --metrics.prometheus=true
            - --metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000
            - --metrics.prometheus.addEntryPointsLabels=true
            - --metrics.prometheus.addServicesLabels=true
            - --entryPoints.metrics.address=:8080
            - --metrics.prometheus.entryPoint=metrics
          ports:
            - name: web
              containerPort: 80
              protocol: TCP
            - name: websecure
              containerPort: 443
              protocol: TCP
            - name: metrics
              containerPort: 8080
              protocol: TCP

```

```yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: metrics
  namespace: traefik-controller
spec:
  entryPoints:
    - metrics
  routes:
    - match: Host(`traefik.mydomain.net`) && PathPrefix(`/metrics`)
      kind: Rule
      services:
        - name: prometheus@internal
          kind: TraefikService

```

I am trying to access the metrics at `http://traefik.mydomain.net:8080/metrics` but I am getting an empty response back.

Any suggestion as to what I am missing?

---

<div class="post-metadata">

**Author:** ![davosian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/davosian/32/2401_2.png) [@davosian](https://community.traefik.io/u/davosian)\
**Post date:** [October 25, 2020, 10:07am UTC](https://community.traefik.io/t/prometheus-metrics-routing/8312/2 "2020-10-25T10:07:32Z")

</div>

I tried adding `- '--metrics.prometheus.manualRouting=true'` to the DaemonSet configuration, but that did not make any difference (and is only required if I was to use redirects on the /metrics endpoint if I understand correctly).

---

<div class="post-metadata">

**Author:** ![jbtruffault](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jbtruffault/32/3646_2.png) [@jbtruffault](https://community.traefik.io/u/jbtruffault)\
**Post date:** [April 8, 2021, 10:09pm UTC](https://community.traefik.io/t/prometheus-metrics-routing/8312/3 "2021-04-08T22:09:08Z")

</div>

I am also interested by the answer: did you find a workaround ? I also created a post with details of my problem: [Can you help me getting traefik metrics ? (version 2.2.8)](https://community.traefik.io/t/can-you-help-me-getting-traefik-metrics-version-2-2-8/10297)
