-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
I have this ingress for the NGINX ingress class, and it works fine. I need to strip the /api prefix, and this solution works fine for me. But I can't get a similar result when using Caddy:
NGINX ingress (Working):
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: authreact
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
tls:
- hosts:
- acme.example.com
secretName: authreact-tls
rules:
- host: acme.example.com
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: authservice
port:
number: 8000
- path: /
pathType: Prefix
backend:
service:
name: authreact
port:
number: 80My current Caddy ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: caddy-ingress
annotations:
kubernetes.io/ingress.class: caddy
spec:
ingressClassName: caddy
rules:
- http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: authservice
port:
number: 8000
- path: /
pathType: Prefix
backend:
service:
name: authreact
port:
number: 80Is there any annotation or any other simple solution like Nginx Ingress? All requests received at authservice contain the /api prefix with Caddy, but I don't want to have that prefix. Any help will be highly appreciated.
Metadata
Metadata
Assignees
Labels
No labels