No Domain found in rule HostRegexp

I am trying to allow 2 different paths, and a range of incoming set path variables, to be accepted by the HostRegex rule for my Kubernetes-IngressRoute. However no matter what I do, I am always presented with the following error, "No domain found in rule HostRegexp({host:.+\.X\.Y.(path1|path2)\.com\.au}) the TLS options applied for this router will depend on the hostSNI of each request".

Any Idea on what I might be doing incorrectly? Any help would be appreciated, cheers.

Hi @nickyg,
Thanks for your interest in Traefik.

Could you provide your Traefik, and your ingressRoute configurations? So I can try to reproduce and understand what's going on :slight_smile:

Thanks,
Maxence

Hi @moutoum,

Thanks for getting back to me :slight_smile:

Will paste my current config:

IngressRoute

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: X-tool
  namespace: X-namespace
spec:
  routes:
    - match: Host(`X.Y.Z.B.com.au`,`X.Y.A.B.com.au`)
      kind: Rule
      services:
        - name: X-tool
          port: 80
    - match: HostRegexp(`{host:.+\.X\.Y\.(path1|path2)\.Z\.com\.au}`)
      kind: Rule
      services:
        - name: X-tool
          port: 80
  tls:
    secretName: supersecret

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik
  namespace: X-namespace
  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.5
          args:
            - --api.insecure 
            - --accesslog
            - --entrypoints.web.Address=:8000
            - --entrypoints.websecure.Address=:4443
            - --providers.kubernetescrd
            # Please note that this is the staging Let's Encrypt server.
            # Once you get things working, you should remove that whole line altogether.
            - --log
            - --log.level=INFO
          ports:
            - name: web
              containerPort: 8000 
            - name: websecure
              containerPort: 4443 
            - name: admin
              containerPort: 8080

Service

apiVersion: v1
kind: Service
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: X-traefik.Y.Z.A.com.au
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: traefik
  namespace: X-namespace
  labels:
    app.kubernetes.io/component: traefik-ingress-service
spec:
  type: LoadBalancer
  externalTrafficPolicy: Cluster
  ports:
    - protocol: TCP
      name: web
      port: 80 
    - protocol: TCP
      name: admin
      port: 8080 
    - protocol: TCP
      name: websecure
      port: 443
  selector:
    app: traefik

SA

apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: X-namespace
  name: traefik-ingress-controller
  labels:
    product: traefik-ingress-controller

Also have the CRD which matches what can be found in the get started documentation on the Traefik site.

Cheers!