{{- $replicaCount := int .Values.replicaCount -}} {{- $releaseNamespace := .Release.Namespace -}} {{- $clusterDomain := .Values.clusterDomain -}} {{- $fullname := include "kafka.fullname" . -}} {{- $clientProtocol := include "kafka.listenerType" ( dict "protocol" .Values.auth.clientProtocol ) -}} {{- $servicePort := int .Values.service.port -}} {{- $loadBalancerIPListLength := len .Values.externalAccess.service.loadBalancerIPs -}} {{- if and .Values.externalAccess.enabled (not .Values.externalAccess.autoDiscovery.enabled) (not (eq $replicaCount $loadBalancerIPListLength )) (eq .Values.externalAccess.service.type "LoadBalancer") }} ############################################################################### ### ERROR: You enabled external access to Kafka brokers without specifying ### ### the array of load balancer IPs for Kafka brokers. ### ############################################################################### This deployment will be incomplete until you configure the array of load balancer IPs for Kafka brokers. To complete your deployment follow the steps below: 1. Wait for the load balancer IPs (it may take a few minutes for them to be available): kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ template "kafka.name" . }},app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=kafka,pod" -w 2. Obtain the load balancer IPs and upgrade your chart: {{- range $i, $e := until $replicaCount }} LOAD_BALANCER_IP_{{ add $i 1 }}="$(kubectl get svc --namespace {{ $releaseNamespace }} {{ $fullname }}-{{ $i }}-external -o jsonpath='{.status.loadBalancer.ingress[0].ip}')" {{- end }} 3. Upgrade you chart: helm upgrade {{ .Release.Name }} bitnami/{{ .Chart.Name }} \ --set replicaCount={{ $replicaCount }} \ --set externalAccess.enabled=true \ {{- range $i, $e := until $replicaCount }} --set externalAccess.service.loadBalancerIPs[{{ $i }}]=$LOAD_BALANCER_IP_{{ add $i 1 }} \ {{- end }} --set externalAccess.service.type=LoadBalancer {{- else }} {{- if and (or (eq .Values.service.type "LoadBalancer") .Values.externalAccess.enabled) (eq .Values.auth.clientProtocol "plaintext") }} --------------------------------------------------------------------------------------------- WARNING By specifying "serviceType=LoadBalancer" and not configuring the authentication you have most likely exposed the Kafka service externally without any authentication mechanism. For security reasons, we strongly suggest that you switch to "ClusterIP" or "NodePort". As alternative, you can also configure the Kafka authentication. --------------------------------------------------------------------------------------------- {{- end }} ** Please be patient while the chart is being deployed ** Kafka can be accessed by consumers via port {{ $servicePort }} on the following DNS name from within your cluster: {{ $fullname }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }} Each Kafka broker can be accessed by producers via port {{ $servicePort }} on the following DNS name(s) from within your cluster: {{- $brokerList := list }} {{- range $e, $i := until $replicaCount }} {{- $brokerList = append $brokerList (printf "%s-%d.%s-headless.%s.svc.%s:%d" $fullname $i $fullname $releaseNamespace $clusterDomain $servicePort) }} {{- end }} {{ join "\n" $brokerList | nindent 4 }} {{- if (include "kafka.client.saslAuthentication" .) }} You need to configure your Kafka client to access using SASL authentication. To do so, you need to create the 'kafka_jaas.conf' and 'client.properties' configuration files by executing these commands: - kafka_jaas.conf: cat > kafka_jaas.conf < client.properties <