33 lines
542 B
YAML
33 lines
542 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: svc-clusterip
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: svc-example
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
nodePort: 30080
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: deployment-svc-example
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: svc-example
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: svc-example
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:1.19.1
|
|
ports:
|
|
- containerPort: 80
|