404 Not found - Path-based Routing

I have the below simple deployment that I'm unable to get to work when using Path-based Routing.

apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: az-vote
  name: azure-vote-back
spec:
  replicas: 1
  selector:
    matchLabels:
      app: azure-vote-back
  template:
    metadata:
      labels:
        app: azure-vote-back
    spec:
      nodeSelector:
        "beta.kubernetes.io/os": linux
      containers:
      - name: azure-vote-back
        image: mcr.microsoft.com/oss/bitnami/redis:6.0.8
        env:
        - name: ALLOW_EMPTY_PASSWORD
          value: "yes"
        ports:
        - containerPort: 6379
          name: redis
---
apiVersion: v1
kind: Service
metadata:
  namespace: az-vote
  name: azure-vote-back
spec:
  ports:
  - port: 6379
  selector:
    app: azure-vote-back
---
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: az-vote
  name: azure-vote-front
spec:
  replicas: 1
  selector:
    matchLabels:
      app: azure-vote-front
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5 
  template:
    metadata:
      labels:
        app: azure-vote-front
    spec:
      nodeSelector:
        "beta.kubernetes.io/os": linux
      containers:
      - name: azure-vote-front
        image: mcr.microsoft.com/azuredocs/azure-vote-front:v1
        ports:
        - containerPort: 80
        resources:
          requests:
            cpu: 250m
          limits:
            cpu: 500m
        env:
        - name: REDIS
          value: "azure-vote-back"
---
apiVersion: v1
kind: Service
metadata:
  namespace: az-vote
  name: azure-vote-front
spec:
  #type: LoadBalancer
  ports:
  - name: http
    targetPort: 80
    port: 80
  selector:
    app: azure-vote-front
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: azvote
  namespace: az-vote
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
    - host: dev.somedomain.com
      http:
        paths:
          - path: /vote
            pathType: Prefix
            backend:
              service:
                name:  azure-vote-front
                port:
                  name: http

When I visit dev.mydomain.com/vote, I always hit 404 Not Found

I have also tried the official example found here to no avail. Any idea what am I doing wrong?

Hi @demi,
Thanks for your interest in Traefik.

Usually, 404 Not Found occurs when there is a routing configuration issue.
Could you provide your Traefik deployment and services ?

Also, I would recommend you to use the latest version (v2.8) as v1.x are not supported anymore.

Thanks,
Maxence

Hi @moutoum, thank you for your response.

So I have used Helm to deploy Traefik. Below are the values I supplied:

additionalArguments: 
  - "--accesslog=true"
  - "--accesslog.format=json"
  - "--log.level=DEBUG"

service:
  enabled: true
  type: LoadBalancer
  annotations:
    external-dns.alpha.kubernetes.io/hostname: dev.somedomain.com
  annotationsTCP: {}
  annotationsUDP: {}
  labels: {}
  spec: {}
  loadBalancerSourceRanges: []
  externalIPs: []

ports:
  traefik:
    port: 9000
    expose: false
    exposedPort: 9000
    protocol: TCP
  metrics:
    port: 9100
    expose: false
    exposedPort: 9100
    protocol: TCP
  web:
  websecure:
  http:
    port: 8080
    expose: true
    exposedPort: 80
    protocol: TCP
    #redirectTo: https
  https:
    port: 8443
    expose: true
    exposedPort: 443
    protocol: TCP
    tls:
      enabled: true


ingressClass:
  enabled: true
  isDefaultClass: false
  fallbackApiVersion: ""

providers:
  kubernetesCRD:
    enabled: true
    allowCrossNamespace: false
    allowExternalNameServices: false
    allowEmptyServices: false
    namespaces: []
      # - "default"

  kubernetesIngress:
    enabled: true
    allowExternalNameServices: false
    allowEmptyServices: false
    ingressClass: traefik
    namespaces: []
    ingressEndpoint:
      hostname: "dev.somedomain.com"
    publishedService:
      enabled: true

Regarding the version, yes, 2.8 is the version I'm currently using. Thank you for the note.