No displayed k8s ingress information on traefik ui

I use k8s ingress with traefik , it's work fine , but no information about router rule information display on the traefik ui .

Any ideas?

Hi @ian,
Thanks for your interest in Traefik.

It is probably because Traefik is not able to load the dynamic configuration from your ingress.
Did you enable providers.kubernetesingress in your static configuration?

Maxence

Hi @moutoum ,

Thanks for your help .

Configuration :

@ian, is your configuration working now?

I have a similar configuration which is working as expected.

traefik.yml

apiVersion: v1
kind: ServiceAccount
metadata:
  name: traefik-ingress-controller
---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: traefik
  labels:
    app: traefik

spec:
  replicas: 1
  selector:
    matchLabels:
      app: traefik
  template:
    metadata:
      labels:
        app: traefik
    spec:
      serviceAccountName: traefik-ingress-controller
      containers:
        - name: traefik
          image: traefik:v2.7
          args:
            - --api.insecure
            - --log.level=DEBUG
            - --entrypoints.web.address=:80
            - --providers.kubernetescrd
            - --providers.kubernetesingress
          ports:
            - name: web
              containerPort: 80
            - name: dashboard
              containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: traefik-dashboard-service

spec:
  type: LoadBalancer
  ports:
    - port: 8080
      targetPort: dashboard
  selector:
    app: traefik
---
apiVersion: v1
kind: Service
metadata:
  name: traefik-web-service

spec:
  type: LoadBalancer
  ports:
    - targetPort: web
      port: 80
  selector:
    app: traefik

whoami.yml

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: whoami
  labels:
    app: whoami

spec:
  replicas: 1
  selector:
    matchLabels:
      app: whoami
  template:
    metadata:
      labels:
        app: whoami
    spec:
      containers:
        - name: whoami
          image: traefik/whoami
          ports:
            - name: web
              containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: whoami

spec:
  ports:
    - port: 80
      targetPort: web
  selector:
    app: whoami
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-web-ingress
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: whoami
            port:
              number: 80

Let me know if it works for you.

Thanks,
Maxence

Hi Maxence ;

Thanks

I use microk8s , default use nginx , when i disable nginx ,the traefik ui is work

but when i use 80 port run web site service , it's response reject connect , if i input node port on url , it's work .

I don't know what is wrong .

http://172.16.3.204 , response reject connect and in traefik pod log not found any request log.

http://172.16.3.204:30090 , it's map to my web site service and work fine , in traefik pod log can found the request log.

My traefik.yaml :

My Web yaml

i found the solution,in create traefik-controller yaml must set hostNetwork: true .

Thanks