Skip to content

Commit de59a8d

Browse files
rgobsalamat
authored andcommitted
Issue 7287 zookeeper testing probes (kubernetes#7290)
* Replace old zkOk.sh livenessProbe by zookeeper-ready Fixes one part of the issue kubernetes#7287 * Update probe script content with the zookeeper-ready Fixes the part with shows/explains the probe script at issue kubernetes#7287 * Fix the path to delete liveness probe Issue kubernetes#7287 * Replace zkOk.sh readinessProbe by zookeeper-ready Fixes "Testing for Readiness" section in issue kubernetes#7287
1 parent 894b6d2 commit de59a8d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/tutorials/stateful-application/zookeeper.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,9 @@ The Pod `template` for the `zk` StatefulSet specifies a liveness probe.
798798
livenessProbe:
799799
exec:
800800
command:
801-
- "zkOk.sh"
801+
- sh
802+
- -c
803+
- "zookeeper-ready 2181"
802804
initialDelaySeconds: 15
803805
timeoutSeconds: 5
804806
```
@@ -809,8 +811,7 @@ word to test the server's health.
809811

810812

811813
```bash
812-
ZK_CLIENT_PORT=${ZK_CLIENT_PORT:-2181}
813-
OK=$(echo ruok | nc 127.0.0.1 $ZK_CLIENT_PORT)
814+
OK=$(echo ruok | nc 127.0.0.1 $1)
814815
if [ "$OK" == "imok" ]; then
815816
exit 0
816817
else
@@ -831,7 +832,7 @@ In another window, delete the `zkOk.sh` script from the file system of Pod `zk-0
831832

832833

833834
```shell
834-
kubectl exec zk-0 -- rm /opt/zookeeper/bin/zkOk.sh
835+
kubectl exec zk-0 -- rm /usr/bin/zookeeper-ready
835836
```
836837

837838

@@ -875,7 +876,9 @@ probe from the `zookeeper.yaml` manifest is identical to the liveness probe.
875876
readinessProbe:
876877
exec:
877878
command:
878-
- "zkOk.sh"
879+
- sh
880+
- -c
881+
- "zookeeper-ready 2181"
879882
initialDelaySeconds: 15
880883
timeoutSeconds: 5
881884
```

0 commit comments

Comments
 (0)