Repository Reading Site
10-probe-bad-deployment.yaml
manifests/10-reliability/10-probe-bad-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: probe-bad
namespace: reliability-lab
labels:
lesson: reliability
app: probe-bad
spec:
replicas: 1
selector:
matchLabels:
lesson: reliability
app: probe-bad
template:
metadata:
labels:
lesson: reliability
app: probe-bad
spec:
containers:
- name: app
image: busybox:1.36
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- |
mkdir -p /www
printf 'booting without startupProbe\n' > /www/index.html
sleep 25
printf 'ok\n' > /www/startup
printf 'ok\n' > /www/ready
printf 'ok\n' > /www/live
exec httpd -f -p 8080 -h /www
ports:
- name: http
containerPort: 8080
livenessProbe:
httpGet:
path: /live
port: http
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 2
readinessProbe:
httpGet:
path: /ready
port: http
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 1
resources:
requests:
cpu: 10m
memory: 32Mi