learning-k8s/ingress.yml
2024-04-29 09:29:06 +02:00

29 lines
561 B
YAML

apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: ingress-httpbin-nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
virtualhost:
fqdn: localhost
routes:
- services:
- name: nginx
port: 80
conditions:
- prefix: /nginx
pathRewritePolicy:
replacePrefix:
- prefix: /nginx
replacement: /
- services:
- name: httpbin
port: 80
conditions:
- prefix: /httpbin
pathRewritePolicy:
replacePrefix:
- prefix: /httpbin
replacement: /