From 2c4b6cd96dd45d52065431ad97a034d0444100a7 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 27 Jun 2017 13:08:54 +0200 Subject: Adds probes, but for Kafka I don't think it indicates readiness... which might not matter because we no longer have a loadbalancing service. These probes won't catch all failure modes, but if they fail we're pretty sure the container is malfunctioning. I found some sources recommending ./bin/kafka-topics.sh for probes but to me it looks risky to introduce a dependency to some other service for such things. One such source is https://github.com/kubernetes/charts/pull/144 The zookeeper probe is from https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ An issue is that zookeeper's logs are quite verbose for every probe. --- 50kafka.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '50kafka.yml') diff --git a/50kafka.yml b/50kafka.yml index 4a57f3d..862cbe0 100644 --- a/50kafka.yml +++ b/50kafka.yml @@ -47,6 +47,12 @@ spec: requests: cpu: 100m memory: 512Mi + livenessProbe: + exec: + command: + - /bin/sh + - -c + - 'echo "" | nc -w 1 127.0.0.1 9092' volumeMounts: - name: data mountPath: /var/lib/kafka/data -- cgit v1.2.3