Skip to content

Commit

Permalink
Upgrade networking api in ingress and use new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolja Lucht committed Oct 10, 2021
1 parent cdf024a commit 8923810
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
14 changes: 9 additions & 5 deletions Ingress/fanout.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-fanout
Expand All @@ -12,9 +12,13 @@ spec:
paths:
- path: /path1
backend:
serviceName: testsvc1
servicePort: 4201
service:
name: testsvc1
port:
number: 4201
- path: /path2
backend:
serviceName: testsvc2
servicePort: 4202
service:
name: testsvc2
port:
number: 4202
8 changes: 5 additions & 3 deletions Ingress/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-ingress
spec:
backend:
serviceName: testsvc
servicePort: 80
service:
name: testsvc
port:
number: 80
20 changes: 13 additions & 7 deletions Ingress/nohost.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: name-virtual-host-ingress
Expand All @@ -9,17 +9,23 @@ spec:
http:
paths:
- backend:
serviceName: testsvc1
servicePort: 80
service:
name: testsvc1
port:
number: 80
- host: second.foo.com
http:
paths:
- backend:
serviceName: testsvc2
servicePort: 80
service:
name: testsvc2
port:
number: 80
# No host supplied here
- http:
paths:
- backend:
serviceName: testsvc3
servicePort: 80
service:
name: testsvc3
port:
number: 80

0 comments on commit 8923810

Please sign in to comment.