kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-{{ .Release.Name }}-middleware@kubernetescrd"
name: "{{ .Release.Name }}-ingress"
namespace: "{{ .Release.Namespace }}"
spec:
tls:
- hosts:
- website
secretName: "{{ .Release.Name }}-secret-tls"
rules:
- host: website
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-service
port:
number: 80
- path: /api
pathType: Prefix
backend:
service:
name: api-nestjs-service
port:
number: 8080
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: "{{ .Release.Name }}-middleware"
namespace: "{{ .Release.Namespace }}"
spec:
stripPrefix:
forceSlash: false
prefixes:
- /api
Am currently trying to make the / endpoint route towards the frontend, and the /api endpoint to the backend, where /api/a would just be /a At the moment, I can get my frontend working completely fine, but I cant get the website to route to the backend, at all. website.com/api/a will just show me a default website error, and because of this, its not redirecting to the backend. Ive been trying to solve this for god knows how long, so any help would be appreciated