Skip to content

Instantly share code, notes, and snippets.

@dkeightley
Created June 1, 2019 03:42
Show Gist options
  • Save dkeightley/430a5b237f73a32dbbf23bd6286723f3 to your computer and use it in GitHub Desktop.
Save dkeightley/430a5b237f73a32dbbf23bd6286723f3 to your computer and use it in GitHub Desktop.
Nginx deployment demonstrating liveness and readiness probes, it won't reach a ready state until /ready succeeds
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-not-ready
spec:
replicas: 1
selector:
matchLabels:
app: nginx-not-ready
template:
metadata:
labels:
app: nginx-not-ready
spec:
containers:
- name: nginx
image: nginx:latest
livenessProbe:
httpGet:
path: /
port: 80
httpHeaders:
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /ready
port: 80
initialDelaySeconds: 3
periodSeconds: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment