Skip to content

Commit

Permalink
updated solution
Browse files Browse the repository at this point in the history
  • Loading branch information
schijioke-uche committed Mar 12, 2021
1 parent c7aadba commit 2bd6842
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docker-and-app/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: docker.io/jchijiok/helloworld:v1.0.0
ports:
- containerPort: 80
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
livenessProbe: # Liveness and Readines - if can't start serving traffic right away & takes between two to thirty seconds to become ready.
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 6 # Liveness: Tells the kubelet to wait 6 seconds before performing the first probe.
periodSeconds: 6 # Liveness: Kubelet performs a liveness probe every 6 seconds when told.

0 comments on commit 2bd6842

Please sign in to comment.