I have tried with a kubernetes ingress as follows:
# ingress.yaml
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prefect-traefik
namespace: prefect
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
ingressClassName: traefik-external
rules:
- http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: prefect-server
port:
number: 4200
I have tried with an
ingressroute:apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: prefect-api-ingress
namespace: prefect
annotations:
kubernetes.io/ingress.class: "traefik-external"
spec:
entryPoints:
- websecure
routes:
- match: Host(`traefik.*******.com`) && PathPrefix(`/api`)
kind: Rule
services:
- name: prefect-server
port: 4200
namespace: prefect
and I keep getting 404, what is going on?!
{"ClientAddr":"HIDDEN","ClientHost":"HIDDEN","ClientPort":"21209","ClientUsername":"-","DownstreamContentSize":19,"DownstreamStatus":404,"Duration":96761,"GzipRatio":0,"OriginContentSize":0,"OriginDuration":0,"OriginStatus":0,"Overhead":96761,"RequestAddr":"HIDDEN","RequestContentSize":0,"RequestCount":7,"RequestHost":"HIDDEN","RequestMethod":"GET","RequestPath":"/","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"http","RetryAttempts":0,"StartLocal":"2024-06-28T04:23:06.284894755Z","StartUTC":"2024-06-28T04:23:06.284894755Z","entryPointName":"web","level":"info","msg":"","time":"2024-06-28T04:23:06Z"}