I am struggling to get my metrics exposed on Kubernetes with Traefik 2.3.2. This is the CRD configuration I am using:
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
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?