Я пытаюсь использовать Helm для настройки развертывания kafka, используя следующую диаграмму https://github.com/helm/charts/tree/master/incubator/kafka
Я следовал инструкциям, чтобы открыть службу, чтобы я мог получить доступ к kafka извне кластера,однако я все еще не могу подключиться к брокеру.
Ниже приведена соответствующая конфигурация значений для диаграммы.
## External access.
##
external:
enabled: true
# type can be either NodePort or LoadBalancer
type: NodePort
# annotations:
# service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
dns:
useInternal: false
useExternal: true
# If using external service type LoadBalancer and external dns, set distinct to true below.
# This creates an A record for each statefulset pod/broker. You should then map the
# A record of the broker to the EXTERNAL IP given by the LoadBalancer in your DNS server.
distinct: false
servicePort: 19092
firstListenerPort: 31090
domain: cluster.local
loadBalancerIP: []
init:
image: "lwolf/kubectl_deployer"
imageTag: "0.4"
imagePullPolicy: "IfNotPresent"
# Annotation to be added to Kafka pods
podAnnotations: {}
## Configuration Overrides. Specify any Kafka settings you would like set on the StatefulSet
## here in map format, as defined in the official docs.
## ref: https://kafka.apache.org/documentation/#brokerconfigs
##
configurationOverrides:
"offsets.topic.replication.factor": 3
"confluent.support.metrics.enable": false # Disables confluent metric submission
# "auto.leader.rebalance.enable": true
# "auto.create.topics.enable": true
# "controlled.shutdown.enable": true
# "controlled.shutdown.max.retries": 100
"advertised.listeners": |-
EXTERNAL://kafka.cluster.local:$((31090 + ${KAFKA_BROKER_ID}))
"listener.security.protocol.map": |-
PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
после запуска установки helm:
If you wish to connect to Kafka from outside please configure your external Kafka
clients to point at the following brokers. Please allow a few minutes for all
associated resources to become healthy.
kafka.cluster.local:31090
kafka.cluster.local:31091
kafka.cluster.local:31092
Вывод из списка сервисов миникубе:
|-------------|--------------------------|-----------------------------|
| NAMESPACE | NAME | URL |
|-------------|--------------------------|-----------------------------|
| default | kafka | No node port |
| default | kafka-0-external | http://192.168.99.100:31090 |
| default | kafka-1-external | http://192.168.99.100:31091 |
| default | kafka-2-external | http://192.168.99.100:31092 |
| default | kafka-headless | No node port |
| default | kafka-zookeeper | No node port |
| default | kafka-zookeeper-headless | No node port |
| default | kubernetes | No node port |
| kube-system | kube-dns | No node port |
| kube-system | kubernetes-dashboard | http://192.168.99.100:30000 |
| kube-system | tiller-deploy | No node port |
|-------------|--------------------------|-----------------------------|
Вывод из kafkacat -b 192.168.99.100:31090 -L: % ERROR: Failed to acquire metadata: Local: Broker transport failure
Внутри журналов для экземпляра zookeeper есть это предупреждение:
2019-05-10 13:50:51,038 [myid:] - WARN [main:QuorumPeer$QuorumServer@173] - Failed to resolve address: kafka-zookeeper-2.kafka-zookeeper-headless.default.svc.cluster.local
Я уверен, что есть проблема с разрешением адреса, но я не могу понять, что делать после привязки рекламируемых слушателей.Любая помощь будет принята с благодарностью.