kafka readiness probes failing kafka readiness probes failing kubernetes kubernetes

kafka readiness probes failing


You're binding your kafka to zookeeper in a way that it's not a good practice.

I use kafka from apache official site and I have found that there's a specific script to make a readiness probe:

readinessProbe:  exec:    command:    - sh    - -c    - "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server=localhost:9092"


I had similar issue. following changes, helped me overcoming this.

# readinessProbe & livenessProbe   readinessProbe:    tcpSocket:      port: 9092    timeoutSeconds: 5    periodSeconds: 5    initialDelaySeconds: 45  livenessProbe:    exec:      command:      - sh      - -c      - "kafka-broker-api-versions.sh --bootstrap-server=localhost:9092"    timeoutSeconds: 5    periodSeconds: 5    initialDelaySeconds: 60

Basing on your requirement, You can update following value.

initialDelaySeconds