Traefik Ingress configuration

Hi Team,

AWX and Kubernetes-dashboard is installed on my k3s.
I’m using Traefik because it is by default installed and I want to expose my two services through host with this ingress router.
Unfortunately I can only access on one application but not both.

First of all, I’ve some question about the configuration:

  • NodePort is configured, it is ok or should I use LoadBalancer?
  • I’m using two ingress file one for AWX and one for the dashboard, it is so correct?
  • I wondered if I should use a router as entrypoint: like:
http:
  routers:
    Router-1:
      # By default, routers listen to every entry points
      rule: "Host(`example.com`)"
      service: "service-1"

Here're my both ingress configuration:
Kubernetes-Dashboard

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kubernetes-dashboard-ingress
  namespace: kubernetes-dashboard
  labels:
    app: kubernetes-dashboard
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/service.serversscheme: https
spec:
  tls:
  - hosts:
      - <xxx>-awx.<domain>.<org>
    secretName: <xxx>-awx-secret-tls
  rules:
  - host: <xxx>-awx.<domain>.<org>
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kubernetes-dashboard
            port:
              number: 443

AWX:

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: awx-ingress
  namespace: awx
  labels:
    app: awx
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/service.serversscheme: https
spec:
  tls:
  - hosts:
      - <xxx>-awx.<domain>.<org>
    secretName: <xxx>-awx-secret-tls
  rules:
  - host: awx.<domain>.<org>
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: awx-instance-service
            port:
              number: 80

Thanks in advance for your help