1

I am trying to add liveness and readinessprobe for zookeeper using bitnami/zookeeper image, but the pod creation is failing, please let me know what values need to be added in liveness and readiness probe.

Below is the value that I have tried with.

livenessProbe:
      enabled: true
      initialDelaySeconds: 120
      periodSeconds: 30
      timeoutSeconds: 5
      failureThreshold: 6
      successThreshold: 1
readinessProbe:
      enabled: true
      initialDelaySeconds: 120
      periodSeconds: 30
      timeoutSeconds: 5
      failureThreshold: 6
      successThreshold: 1

I am getting the below error.

[spec.containers[0].livenessProbe: Required value: must specify a handler type, spec.containers[0].readinessProbe: Required value: must specify a handler type]

SVD
  • 385
  • 4
  • 24

1 Answers1

1

The Kubernetes Probes as the livenessProbe and readinessProbe require a handler which is used for the probe. Kubernetes supports multiple handler types, e.g. a HTTP request probe or a liveness command probe. There are additional handler types, e.g. TCP probes. You can find all supported handler types in the documentation.
Please note that the handler configuration is required and there isn't a default handler type.

Jonas Breuer
  • 101
  • 3
  • To add to this answer: Zookeeper has a built-in mechanism to check it's liveness/readiness, by issuing `zookeeper-ready 2181` command. You can read more [here](https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/) –  Jan 24 '22 at 13:55
  • I tried with zookeeper-ready, didn't work for me, is it due to the image that I am using? I am using bitnami/zookeeper image. In the document the image shown as k8s.gcr.io/kubernetes-zookeeper:1.0-3.4.10 – SVD Jan 25 '22 at 04:10
  • @p10l any idea for bitnami/zookeeper image, which script to be used for healthCheck. As with zookeeper-ready script it is not working. – SVD Jan 27 '22 at 04:45