learning-k8s/ingress.yml

29 lines
561 B
YAML
Raw Normal View History

2024-04-29 07:29:06 +00:00
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: /