This commit is contained in:
Oriol 2023-03-14 22:13:23 +00:00
parent d30c7d532e
commit 57cf353500

View File

@ -24,4 +24,24 @@ spec:
- name: name-of-service-port
protocol: TCP
port: 80
targetPort: http-web-svc
targetPort: http-web-svc
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-service
spec:
selector:
matchLabels:
app: nginx-backend
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80