-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s_deployment.yaml
48 lines (46 loc) · 1.06 KB
/
k8s_deployment.yaml
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
41
42
43
44
45
46
47
apiVersion: apps/v1
kind: Deployment
metadata:
name: health-claim-serve
labels:
app: health-claim
spec:
replicas: 3
selector:
matchLabels:
app: health-claim
template:
metadata:
labels:
app: health-claim
spec:
containers:
- name: health-claim-serve
image: fact-checking-api:v1
ports:
- containerPort: 8000 # Matching the FastAPI app's port
readinessProbe:
httpGet:
path: /health
port: 8000 # Probe checks the correct port inside the container
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10
periodSeconds: 15
---
apiVersion: v1
kind: Service
metadata:
name: health-claim-service
spec:
selector:
app: health-claim
ports:
- protocol: TCP
port: 80 # Expose service on port 80 externally
targetPort: 8000 # Directs traffic to port 8000 on the container
type: LoadBalancer