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?