Yolean/kubernetes-kafka

Setting up failure of kafka cluster in bare metal machine

jzeng4 opened this issue · 3 comments

I have set up k8s locally in my ubuntu-18.04 machine according to this.

After following the steps in the page, I can't have kubernetes-kafka work properly.

The output of running kubectl describe pod kafka-0 -n kafka:

_Warning FailedScheduling 26s (x4 over 35s) default-scheduler pod has unbound immediate PersistentVolumeClaims_

I guess it is due to incorrect PVC setting. Any idea to fix the problem? Thanks a lot!

On baremetal with statefulset you'll have to figure out how to provision volumes, or you have to manually cretate the PVCs beforehand. For an earlier version of kubernetes-kafka I did that in a virtual machine setup. If you're interested yamls can still be found at https://github.com/Yolean/youkube/tree/master/local-volume/kafka. For provisioning there's an interesting podcast episode https://kubernetespodcast.com/episode/036-rook/.

@solsson Thanks a lot for the references! I have setup up kubernetes-kafka with the help of rook. I am wondering how to verify if the system is working properly. Does kubernetes-kafka provide any test cases? Thanks!

There basic sanity checks in https://github.com/Yolean/kubernetes-kafka/tree/master/kafka/test.

To try manually I recommend kafkacat. I think Confluent has a tutorial on how to use it. Exec into a pod running a kafkacat image, such as the one in the kafkacat readiness test in the folder I linked to.