Yolean/kubernetes-kafka

Erro creating zookeeper/50pzoo

Opened this issue · 4 comments

Hi,

I´ve trying to setup a kubernetes-kafka on Rancher / Kubernetes. At the start, I faced an error while creating the Statefulset in file 50pzoo.yml. The error is:

Error from server (BadRequest): error when creating "50pzoo.yml": StatefulSet in version "v1beta2" cannot be handled as a StatefulSet: no kind "StatefulSet" is registered for version "apps/v1beta2"

I tryied to fix the problem with a v1 apiVersion but without success.

See the top of README.md. You probably have a kubernetes version <1.8. You can still use older tags of this repo. The reason we opt for quite recent kubernetes versions is that StatefulSet support has matured, as in #57.

That is it! For test purpose I changed apiVersion to apps/v1beta2 and it works. I've been using a Rancher with Kubernetes 1.7.7, I will following your recommendation and use this one: #57

Thank you

@solsson But I got the error:
ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /etc/kafka/zookeeper.properties
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.IllegalArgumentException: /var/lib/zookeeper/data/myid file is missing
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:406)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:150)
... 2 more

The myid file is written at every pod start from https://github.com/Yolean/kubernetes-kafka/blob/v3.1.0/zookeeper/10zookeeper-config.yml#L13. Could it be some volume mismatch with the init container?