Skip to content

Instantly share code, notes, and snippets.

@pingkunga
Created November 19, 2023 02:45
Show Gist options
  • Save pingkunga/6b807eccffea9b2183a6dd068ec31ef2 to your computer and use it in GitHub Desktop.
Save pingkunga/6b807eccffea9b2183a6dd068ec31ef2 to your computer and use it in GitHub Desktop.
Sample Simulate Readiness
apiVersion: apps/v1
kind: Deployment
metadata:
name: busybox-deployment
spec:
replicas: 1
selector:
matchLabels:
app: busybox
template:
metadata:
labels:
app: busybox
spec:
containers:
- name: busybox
image: busybox
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
args:
- /bin/sh
- -c
- >
while true; do
touch /tmp/healthy;
echo "File /tmp/healthy created.";
sleep 15;
rm /tmp/healthy;
echo "File /tmp/healthy deleted.";
sleep 15;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment