Can the livenessProbe and readinessProbe for Kafka Brokers be changed? #8244
Replies: 2 comments 5 replies
-
I'm not sure I follow the issue TBH. But if you want, you can modify the timings of the probes. So if you need more time before the pod gets ready, you can for example increase the initial delay. Check the docs for the details (look for something like |
Beta Was this translation helpful? Give feedback.
-
The main issue here, is that we have a race condition where the kafka broker is ready before k8s If you can think of another approach.... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I have a Kafka Cluster deployed using strimzi operator on a K8s cluster within AWS.
Strimzi Operator: V 0.28.0
Kafka Version: 3.0.0
The cluster needs to be accesible from outside, so we have set up ExternalDNS to provide server hostname access for the clients using the
external-dns
annotations for the bootstrap serverNow comes the problem, when a doing a rolling restart, a race condition between the brokers restart and the ExternalDNS happens. The DNS entry for the bootstrap server gets deleted as the pods are in a restarting state, when the pods come back alive and reach
READY
state, the clients cannot send data to them as the DNS entry has not been created again.A mitigation for this could be to increase the TTL of the DNS entry to a value larger than the expected restarting time but this is just hiding the problem by diminishing the chance of the race condition to be met.
Ideally, we would like to modify the readinessProbe of the Kafka Broker pods, to wait until the DNS entry for the bootstrap server is found (dns lookup), however Kafka resource does not seem to allow modifying what the readinessProbe does, only waiting and frequency durations as well as threshold values can be changed.
Is there a way to modify the readinessProbe behavior and/or extend it to wait until the DNS can be resolved, keeping in mind that this is an issue caused by how ExternalDNS works under the hood?
P.S. Using internal listeners for clients works fine as the brokers can be reached within the cluster, but external clients cannot reach the brokers until the ExternalDNS has created the entry.
Beta Was this translation helpful? Give feedback.
All reactions