我目前正在尝试使用 Helm 将 Pulsar 安装到 Minikube 集群上。一切似乎都正确安装,但 pod 没有在正确的命名空间下注册。我正在运行以下脚本将 Pulsar 安装到 Minikube 上:
#!/bin/bash
# this script assumes that the pre-requisites have been
# installed, and that you just need to create a minikube
# cluster and then deploy pulsar to it
# startup a minikube kubernetes cluster
minikube start --memory=8192 --cpus=4 --kubernetes-version=v1.19.0
# point kubectl towards minikube
kubectl config use-context minikube
# install the pulsar helm chart
./pulsar-helm-chart/scripts/pulsar/prepare_helm_release.sh --create-namespace --namespace pulsar --release pulsar-mini
# install pulsar using the helm chart
helm install --set initialize=true --values pulsar-helm-chart/examples/values-minikube.yaml pulsar-mini apache/pulsar
# wait and then show what is going on
sleep 1m
kubectl get all
# need to wait or else the pods wont display
sleep 5m
# display the pods
kubectl get pods -n pulsar -o name
相反,Pod 显示在默认命名空间下。运行查询以获取 Pulsar 命名空间下的 pod 会产生以下结果:
xyz-MacBook-Pro:pulsar xyz$ kubectl get pods -n pulsar -o name
xyz-MacBook-Pro:pulsar xyz$
然而,在对所有 Pod 进行通用查询时,我能够看到所有已安装的 Pod:
xyz-MacBook-Pro:pulsar xyz$ kubectl get pods -o name
pod/mysite-769d76764c-6dnct
pod/pulsar-mini-bookie-0
pod/pulsar-mini-bookie-init-xbnsc
pod/pulsar-mini-broker-0
pod/pulsar-mini-grafana-555cf54cf-wdcs5
pod/pulsar-mini-prometheus-5556dbb8b8-s7q2d
pod/pulsar-mini-proxy-0
pod/pulsar-mini-pulsar-init-sq87h
pod/pulsar-mini-pulsar-manager-6c6889dff-ckfwl
pod/pulsar-mini-toolset-0
pod/pulsar-mini-zookeeper-0