add ingress examples
This commit is contained in:
parent
a702e60990
commit
9edb9edfd1
2 changed files with 43 additions and 0 deletions
15
CKA_Course/ingress.yaml
Normal file
15
CKA_Course/ingress.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: my-ingress
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: /somepath
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: my-service
|
||||
port:
|
||||
number: 80
|
28
CKA_Course/ingress_named_port.yaml
Normal file
28
CKA_Course/ingress_named_port.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: my-service
|
||||
spec:
|
||||
selector:
|
||||
app: MyApp
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: my-ingress
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: /somepath
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: my-service
|
||||
port:
|
||||
name: web
|
Loading…
Reference in a new issue