kubernetes - 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?
解决方案
您可以使用该类型创建新的 Kubernetes 服务,LoadBalancer
并尝试在 Kubernetes 之外公开您的服务。
默认情况下,此掌舵图创建服务类型ClusterIP
:https ://github.com/vectorizedio/helm-charts/blob/main/redpanda/templates/service.bootstrap.yaml
步骤:
列出所有服务名称
Kubectl get svc -n <namespace name if any>
复制redpanda
服务 YAML 配置并更改两个字段Name
,Type
LoadBalancer
而不是ClusterIP
.
阅读有关服务类型的更多信息:https ://kubernetes.io/docs/concepts/services-networking/service/
另一种方式
如果您不想这样做,只需更改掌舵图表模板 YAML 使用它。
由于版本名称更改或缺少命名空间问题,可能是一个无法与您合作的解决方案。
您可以将服务类型更改为Nodeport
和Loadbalancer
。完成后,您可以从集群外部访问该服务。
推荐阅读
- javascript - 猜词游戏中的js错误疑难解答
- reactjs - 反应路由器不呈现视图,但 url 正在改变
- python - 如何在 Open CV Python 中消除这些噪音?
- python - 错误消息:无法找到软件包 libatlas3gf-base
- javascript - 使用 Blazor(即 WebAssembly)+ javascript
- php - MYSQL 更新 PHP 文件停止更新
- ios - 在标题视图字段iOS上阅读水龙头
- react-native - 视图不是全屏 React-Native
- javascript - JavaScript 倒计时在到达 00:00 时重定向另一个页面
- c - 我正在尝试通过指针和二维数组访问数据,但出现总线错误,有人知道为什么会这样吗?