-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingress.yaml
35 lines (35 loc) · 1.05 KB
/
ingress.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/rewrite/README.md
# https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#canary
#
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/enable-access-log: "true"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/rewrite-target: /$2
name: zt-ingress
namespace: default
spec:
ingressClassName: nginx
rules:
- host: zt.localdev.me
http:
paths:
- path: /v1(\/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: zt-nginx-svc
port:
number: 80
- path: /v2(\/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: zt-nginx-svc
port:
number: 80