首页 > 解决方案 > how to have external connectivity in redpanda on kubernetes?

问题描述

I used this helm chart for deploying redpanda to kubernetes: https://github.com/vectorizedio/helm-charts

but I have a problem with external access to kafka!

I googled about how to have an external access to redpanda from out side of kubernetes cluster and I found this documentation: https://vectorized.io/docs/kubernetes-external-connect/

but it does not work for me because it's old. currently I'm using version 1.0.6 of redpanda helm chart and the above documentation is for old version.

how can I have an external access from outside of cluster with latest helm chart version?

标签: kubernetesapache-kafkaredpanda

解决方案


您可以使用该类型创建新的 Kubernetes 服务,LoadBalancer并尝试在 Kubernetes 之外公开您的服务。

默认情况下,此掌舵图创建服务类型ClusterIPhttps ://github.com/vectorizedio/helm-charts/blob/main/redpanda/templates/service.bootstrap.yaml

步骤:

列出所有服务名称

Kubectl get svc -n <namespace name if any>

复制redpanda服务 YAML 配置并更改两个字段NameType LoadBalancer而不是ClusterIP.

阅读有关服务类型的更多信息:https ://kubernetes.io/docs/concepts/services-networking/service/

另一种方式

如果您不想这样做,只需更改掌舵图表模板 YAML 使用它。

由于版本名称更改或缺少命名空间问题,可能是一个无法与您合作的解决方案。

您可以将服务类型更改为NodeportLoadbalancer。完成后,您可以从集群外部访问该服务。


推荐阅读