diff --git a/CKA_Course/ingress.yaml b/CKA_Course/ingress.yaml new file mode 100644 index 0000000..142dd1d --- /dev/null +++ b/CKA_Course/ingress.yaml @@ -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 diff --git a/CKA_Course/ingress_named_port.yaml b/CKA_Course/ingress_named_port.yaml new file mode 100644 index 0000000..5345599 --- /dev/null +++ b/CKA_Course/ingress_named_port.yaml @@ -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