k8s-samples/CKA_Course/ingress_named_port.yaml
2022-08-18 21:12:57 -05:00

28 lines
424 B
YAML

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