Add svc to deploymentv2
parent
b29e4007dd
commit
ad342b880e
|
|
@ -51,3 +51,21 @@ spec:
|
||||||
- name: nginx-pv
|
- name: nginx-pv
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: nginx-pvc
|
claimName: nginx-pvc
|
||||||
|
---
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
name: nginx-svc
|
||||||
|
spec:
|
||||||
|
allocateLoadBalancerNodePorts: true
|
||||||
|
ports:
|
||||||
|
- nodePort:
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: nginx
|
||||||
|
type: LoadBalancer
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue