Skip to content

Commit

Permalink
Add healtcheck to k8s services using readinessProbe
Browse files Browse the repository at this point in the history
  • Loading branch information
mapeveri committed Mar 22, 2024
1 parent 4a46745 commit 54b8c6d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .k8s/app-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ spec:
name: languages-app-secret
ports:
- containerPort: 4000
readinessProbe:
httpGet:
path: /api/v1/health
port: 4000
initialDelaySeconds: 5
periodSeconds: 10
restartPolicy: Always
volumes:
- name: app-storage
Expand Down
8 changes: 8 additions & 0 deletions .k8s/app-consumer-events-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ spec:
name: languages-app-config-map
- secretRef:
name: languages-app-secret
ports:
- containerPort: 4001
readinessProbe:
httpGet:
path: /api/v1/health
port: 4001
initialDelaySeconds: 5
periodSeconds: 10
restartPolicy: Always
1 change: 1 addition & 0 deletions .k8s/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ metadata:
data:
NODE_ENV: development
SERVER_PORT: "4000"
SERVER_CONSUMER_PORT: "4001"
FRONTED_URL: "http://localhost:3000"
RABBITMQ_EVENTS_QUEUE: "events_queue"

0 comments on commit 54b8c6d

Please sign in to comment.