yawyd313 0c28696fdf save | 1 month ago | |
---|---|---|
.. | ||
templates | 1 month ago | |
.helmignore | 1 month ago | |
Chart.yaml | 1 month ago | |
README.md | 1 month ago | |
values.yaml | 1 month ago |
https://github.com/itboon/kafka-docker
helm repo add kafka-repo https://helm-charts.itboon.top/kafka
helm repo update kafka-repo
## 下面的部署案例关闭了持久化存储,仅作为演示
helm upgrade --install kafka \
--namespace kafka-demo \
--create-namespace \
--set broker.persistence.enabled="false" \
kafka-repo/kafka
## 默认已开启持久化存储
helm upgrade --install kafka \
--namespace kafka-demo \
--create-namespace \
kafka-repo/kafka
helm upgrade --install kafka \
--namespace kafka-demo \
--create-namespace \
--set broker.combinedMode.enabled="false" \
--set controller.replicaCount="1" \
--set broker.replicaCount="1" \
kafka-repo/kafka
broker.combinedMode.enabled
混部模式,即进程同时具有 broker + controller 角色,单节点服务器启动一个 Pod 即可。kafka-repo/kafka
默认开启混部,kafka-repo/kafka-ha
默认关闭混部。
## kafka-repo/kafka-ha 默认部署 3 controller + 3 broker
helm upgrade --install kafka \
--namespace kafka-demo \
--create-namespace \
kafka-repo/kafka-ha
## 调整集群资源配额
helm upgrade --install kafka \
--namespace kafka-demo \
--create-namespace \
--set controller.replicaCount="3" \
--set broker.replicaCount="3" \
--set broker.heapOpts="-Xms4096m -Xmx4096m" \
--set broker.resources.requests.memory="8Gi" \
--set broker.resources.limits.memory="16Gi" \
kafka-repo/kafka-ha
More values please refer to examples/values-production.yml
请参考 https://github.com/itboon/kafka-docker/blob/main/docs/external.md