forked from maya-a-iuga/Web-App-DevOps-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
40 lines (37 loc) · 856 Bytes
/
deployment.yaml
File metadata and controls
40 lines (37 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
apiVersion: apps/v1
kind: Deployment
metadata:
name: flask-app-deployment
spec:
replicas: 2 # Adjust the number of replicas as needed
selector:
matchLabels:
app: flask-app
template:
metadata:
labels:
app: flask-app
spec:
containers:
- name: flask-app-container
image: chyjuls/web-delivery:latest
ports:
- containerPort: 5000 # Expose the same port specified in your Dockerfile
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
---
apiVersion: v1
kind: Service
metadata:
name: flask-app-services
spec:
selector:
app: flask-app
ports:
- protocol: TCP
port: 80 # Port for internal communication within the cluster
targetPort: 5000 # Port exposed by your container
type: ClusterIP # Internal service