fix ingress syntax. (#7867)
This commit is contained in:
parent
e34ca93ad6
commit
ed34f6c93d
21 changed files with 204 additions and 105 deletions
|
|
@ -15,10 +15,13 @@ spec:
|
|||
- host: stickyingress-samesite-none.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
|
|
@ -35,7 +38,10 @@ spec:
|
|||
- host: stickyingress-samesite-strict.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
@ -13,7 +13,10 @@ spec:
|
|||
- host: stickyingress.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
|
|
@ -47,9 +47,12 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
" | kubectl create -f -
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,13 @@ spec:
|
|||
- host: mydomain.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- mydomain.com
|
||||
|
|
|
|||
|
|
@ -30,10 +30,13 @@ spec:
|
|||
- host: external-auth-01.sample.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
status:
|
||||
loadBalancer:
|
||||
ingress:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ spec:
|
|||
- host: external-auth-01.sample.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
@ -11,11 +11,13 @@ spec:
|
|||
- host: __INGRESS_HOST__
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: kubernetes-dashboard
|
||||
servicePort: 80
|
||||
path: /
|
||||
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kubernetes-dashboard
|
||||
port:
|
||||
number: 80
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
|
|
@ -28,10 +30,13 @@ spec:
|
|||
- host: __INGRESS_HOST__
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: oauth2-proxy
|
||||
servicePort: 4180
|
||||
path: /oauth2
|
||||
- path: /oauth2
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
||||
tls:
|
||||
- hosts:
|
||||
- __INGRESS_HOST__
|
||||
|
|
|
|||
|
|
@ -64,7 +64,15 @@ metadata:
|
|||
name: nginxhello-ingress
|
||||
namespace: default
|
||||
spec:
|
||||
backend:
|
||||
serviceName: nginxhello
|
||||
servicePort: 80
|
||||
rules:
|
||||
- host: foo.bar.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nginxhello
|
||||
port:
|
||||
number: 80
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ spec:
|
|||
- host: custom.configuration.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
|
|
@ -56,10 +56,13 @@ spec:
|
|||
- host: public-demo-echo-service.kube.local
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: demo-echo-service
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: demo-echo-service
|
||||
port:
|
||||
number: 80
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
|
|
@ -74,7 +77,10 @@ spec:
|
|||
- host: secure-demo-echo-service.kube.local
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: demo-echo-service
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: demo-echo-service
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ spec:
|
|||
- host: registry.<your domain>
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: docker-registry
|
||||
servicePort: 5000
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: docker-registry
|
||||
port:
|
||||
number: 5000
|
||||
|
|
@ -12,7 +12,10 @@ spec:
|
|||
- host: registry.<your domain>
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: docker-registry
|
||||
servicePort: 5000
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: docker-registry
|
||||
port:
|
||||
number: 5000
|
||||
|
|
|
|||
|
|
@ -115,14 +115,20 @@ spec:
|
|||
- host: foo.bar.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
- host: bar.baz.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: nginx
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service
|
||||
name: nginx
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
|
|
@ -46,10 +46,13 @@ spec:
|
|||
- host: rewrite.bar.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /something(/|$)(.*)
|
||||
- path: /something(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
' | kubectl create -f -
|
||||
```
|
||||
|
||||
|
|
@ -78,10 +81,13 @@ spec:
|
|||
- host: approot.bar.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
" | kubectl create -f -
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ spec:
|
|||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- backend:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
# This assumes http-svc exists and routes to healthy endpoints.
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
|
|
@ -27,10 +27,13 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
# This assumes http-svc exists and routes to healthy endpoints
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
The following command instructs the controller to terminate traffic using the provided
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ spec:
|
|||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
# This assumes http-svc exists and routes to healthy endpoints
|
||||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
service:
|
||||
name: http-svc
|
||||
port:
|
||||
number: 80
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue