Apache pulsar on Kubernetes cluster (Local Environment)

3/11/2020

Trying to deploy pods in my kubernetes cluster and some of the pods are giving me an error of some storage problems. Screen shot is given below:Kubernetes Dashboard

I am sure the problem is with one of my worker node. its not a problem with pulsar i think. i'll also share the YAML file here just for a clear view of what the problem is. Link to YAML File:https://github.com/apache/pulsar/blob/master/deployment/kubernetes/generic/k8s-1-9-and-above/zookeeper.yaml

I need help with the YAML file to tweek it arround a little, so that the pods can be created with existing requirements i have on my worker nodes. I'll be happy if you need more information.

Thanks in advance

-- basit khan
apache-pulsar
docker
kubernetes
virtual-machine

1 Answer

3/11/2020

It looks like the affinity rules are preventing the pods from starting. In production, you want to make sure the Zookeeper pods (and other pod groups like BookKeeper) don't run on the same worker node, which is why those rules are configured that way. You can increase your Kubernetes setup to 3 worker nodes, or remove the affinity rules from the various stateful sets and deployment files.

Alternatively, you can use this Helm chart (full disclosure: I am the creator) to deploy Pulsar to Kubernetes:

https://helm.kafkaesque.io

See the section "Installing Pulsar for development" for settings that will enable Pulsar to run in smaller Kubernetes setups, including disabling affinity rules.

-- Chris Bartholomew
Source: StackOverflow