Created
November 19, 2023 02:45
-
-
Save pingkunga/6b807eccffea9b2183a6dd068ec31ef2 to your computer and use it in GitHub Desktop.
Sample Simulate Readiness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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