I am using the official apache pulsar helm chart t...
# ai-crosspost
a
I am using the official apache pulsar helm chart to deploy a pulsar cluster in kubernetes. I am using a proxy and the proxy service uses a single external LoadBalancer IP. This is what we use for the service url when sending and receiving messages. The issue is, the cluster initalize job template does the following: args: - | # Use the pipe character for the YAML multiline string. Workaround for kubernetes-sigs/kustomize#4201 {{- include "pulsar.toolset.zookeeper.tls.settings" . | nindent 12 }} export PULSAR_MEM="-Xmx128M"; bin/pulsar initialize-cluster-metadata \ --cluster {{ template "pulsar.cluster.name" . }} \ --zookeeper {{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }} \ {{- if .Values.pulsar_metadata.configurationStore }} --configuration-store {{ template "pulsar.configurationStore.connect" . }}{{ .Values.pulsar_metadata.configurationStoreMetadataPrefix }} \ {{- else }} --configuration-store {{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }} \ {{- end }} --web-service-url http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.http }}/ \ --web-service-url-tls https://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.https }}/ \ --broker-service-url pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsar }}/ \ --broker-service-url-tls pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsarssl }}/ ; {{- if .Values.extraInitCommand }} {{ .Values.extraInitCommand }} {{- end }} {{- else if .Values.components.oxia }} so it uses the internal broker dns name and when I do a bin/pulsar-admin cluster get pulsar-talos, it shows the dns name as the service url, but I want it to show the external IP. How can I fix this? I am using a values.yaml file, but no value configurations have changed it being deployed this way.
@RunLLM?
r
The Pulsar Helm chart's default
initialize-cluster-metadata
job sets the cluster URLs (web service and broker service) to the internal Kubernetes DNS names, not the external LoadBalancer IP. This means
pulsar-admin clusters get cluster
will show internal DNS names, which are not accessible externally. To fix this, you must override the
--web-service-url
,
--web-service-url-tls
,
--broker-service-url
, and
--broker-service-url-tls
arguments in the Helm values to use your external LoadBalancer IP or DNS name instead of the internal service DNS. You can do this by setting the
initialize.metadata
section in your
values.yaml
to provide the correct URLs, for example:
Copy code
initialize:
  metadata:
    webServiceUrl: "http://external-loadbalancer-ip:80"
    webServiceUrlTls: "https://external-loadbalancer-ip:443"
    brokerServiceUrl: "pulsar://external-loadbalancer-ip:6650"
    brokerServiceUrlTls: "pulsar+ssl://external-loadbalancer-ip:6651"
Then, reinstall or upgrade your Helm release. For more, see Pulsar Helm Deploy Docs and Pulsar Bare Metal Deploy Docs. Would you like more detail on how to apply this or how it affects client connectivity? Sources: - Pulsar Bare Metal Deploy Docs - Pulsar Helm Deploy Docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
a
yes please
@RunLLM
r
Step-by-step, here’s how to ensure your Pulsar cluster metadata uses the external LoadBalancer IP for service URLs: 1. Understand the Problem: By default, the Helm chart’s
initialize-cluster-metadata
job uses internal Kubernetes DNS names for
--web-service-url
and
--broker-service-url
. This is only resolvable inside the cluster, not from outside. 2. Override the URLs: In your
values.yaml
, explicitly set the external URLs under the
initialize.metadata
section. For example, if your LoadBalancer IP is `35.123.45.67`:
Copy code
initialize:
  metadata:
    webServiceUrl: "http://35.123.45.67:80"
    webServiceUrlTls: "https://35.123.45.67:443"
    brokerServiceUrl: "pulsar://35.123.45.67:6650"
    brokerServiceUrlTls: "pulsar+ssl://35.123.45.67:6651"
3. Apply the Change: - If you haven’t deployed yet, just include this in your
values.yaml
before running
helm install
. - If you’ve already deployed, update your
values.yaml
and run
helm upgrade ...
to re-apply. You may need to manually update the cluster metadata if it was already initialized with the wrong URLs. Use
pulsar-admin clusters update
to fix it, e.g.:
Copy code
bin/pulsar-admin clusters update cluster-name \
       --broker-url pulsar://35.123.45.67:6650 \
       --url http://35.123.45.67:80
4. Verify: Run
bin/pulsar-admin clusters get cluster-name
and confirm the URLs now show the external IP. 5. Why This Matters: Clients outside the Kubernetes cluster (including Pulsar clients, admin tools, and geo-replication) need to resolve the service URLs to connect. If the URLs are internal, external clients will fail to connect. This approach is documented in the Pulsar Bare Metal Deploy Docs and is compatible with the Helm chart’s override mechanism. Let me know if you need the exact Helm command or more troubleshooting steps. Sources: - https://docs.streamnative.io/docs/networking#access-types - https://docs.streamnative.io/private/tls-load-balancer-1.11.0#%3AR69n6%3A-gradient 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
a
@RunLLM in my values.yaml file I currently have initialize: true
r
It seems likely that just setting
initialize: true
in your
values.yaml
will cause the Helm chart to use default internal DNS names for cluster URLs during metadata initialization. To use your external LoadBalancer IP, you need to add or override the
initialize.metadata
section as described previously—simply having
initialize: true
is not enough for external access configuration. You should update your
values.yaml
to include:
Copy code
initialize:
  enabled: true
  metadata:
    webServiceUrl: "http://external-loadbalancer-ip:80"
    webServiceUrlTls: "https://external-loadbalancer-ip:443"
    brokerServiceUrl: "pulsar://external-loadbalancer-ip:6650"
    brokerServiceUrlTls: "pulsar+ssl://external-loadbalancer-ip:6651"
Replace
external-loadbalancer-ip
with your actual IP or DNS. Would you like more detail on how to apply this and re-initialize the cluster metadata? Sources: - Pulsar Bare Metal Deploy Docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.