29 lines
424 B
YAML
29 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
|