Skip to content

Instantly share code, notes, and snippets.

@bastjan
Created September 3, 2021 14:14
Show Gist options
  • Save bastjan/8ed6f642fde2a575dc9da0d226b5b5c5 to your computer and use it in GitHub Desktop.
Save bastjan/8ed6f642fde2a575dc9da0d226b5b5c5 to your computer and use it in GitHub Desktop.
PodDisruptionBudget test
apiVersion: apps/v1
kind: Deployment
metadata:
name: readiness-test-ready
spec:
selector:
matchLabels:
app: readiness-test-ready
pdb: readiness-test
template:
metadata:
labels:
app: readiness-test-ready
pdb: readiness-test
spec:
containers:
- name: readiness-test-ready
image: debian:bullseye
command: [sleep, infinity]
resources:
limits:
memory: "128Mi"
cpu: "500m"
readinessProbe:
exec:
command: ["true"]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: readiness-test-unready
spec:
selector:
matchLabels:
app: readiness-test-unready
pdb: readiness-test
template:
metadata:
labels:
app: readiness-test-unready
pdb: readiness-test
spec:
containers:
- name: readiness-test-unready
image: debian:bullseye
command: [sleep, infinity]
resources:
limits:
memory: "128Mi"
cpu: "500m"
readinessProbe:
exec:
command: ["false"]
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
annotations: {}
name: readiness-test
spec:
minAvailable: 0
selector:
matchLabels:
pdb: readiness-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment