add ingress examples

This commit is contained in:
John Bowdre 2022-08-18 21:12:57 -05:00
parent a702e60990
commit 9edb9edfd1
2 changed files with 43 additions and 0 deletions

15
CKA_Course/ingress.yaml Normal file
View 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

View 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