### Motivation Fixes #6131 (caused by #5675): When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values. #### Proposed solution: Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set. #### Changes made Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script. ### Documentation Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated.
This directory contains the Helm Chart required to do a complete Pulsar deployment on Kubernetes.
Install Helm
Before you start, you need to install helm. Following helm documentation to install it.
Deploy Pulsar
Minikube
Install Minikube
Install and configure minikube with
a VM driver, e.g. kvm2 on Linux
or hyperkit or VirtualBox on macOS.
Create a K8S cluster on Minikube
minikube start --memory=8192 --cpus=4
Set kubectl to use Minikube.
kubectl config use-context minikube
After you created a K8S cluster on Minikube, you can access its dashboard via following command:
minikube dashboard
The command will automatically trigger open a webpage in your browser.
Install Pulsar Chart
Assume you already cloned pulsar repo in PULSAR_HOME directory.
- Go to Pulsar helm chart directory
cd ${PULSAR_HOME}/deployment/kubernetes/helm - Install helm chart.
helm install --values pulsar/values-mini.yaml ./pulsar
Once the helm chart is completed on installation, you can access the cluster via:
- Web service url:
http://$(minikube ip):30001/ - Pulsar service url:
pulsar://$(minikube ip):30002/
Description
Languages
Shell
58.6%
Smarty
38.6%
Go
2.8%