cp-helm-charts icon indicating copy to clipboard operation
cp-helm-charts copied to clipboard

Why using the headless service in kafka for zookeeper instead of the regular service ?

Open eddycharly opened this issue 3 years ago • 1 comments

https://github.com/confluentinc/cp-helm-charts/blob/38875e2d5f77eb884fffbb161d64a06819d2f0b9/charts/cp-kafka/templates/statefulset.yaml#L120-L121

Here, the headless service is used but shouldn't it be better to use the regular service instead ? If one zookeeper pod is down, the kafka pod could think that zookeeper is down whereas there's still two pods up.

It seems to me that we should either use the regular service and let kubernetes proxy calls to alive pods or specify the list of zookeeper pods directly.

Is there a benefit using the headless service here ?

eddycharly avatar Sep 25 '20 11:09 eddycharly

Check this out https://stackoverflow.com/questions/52707840/what-is-a-headless-service-what-does-it-do-accomplish-and-what-are-some-legiti

javsanbel2 avatar Jun 20 '22 12:06 javsanbel2