gpt4 book ai didi

Can not set custom parameters(numPartitions,defaultReplicationFactor) for bitnami/kafka(无法为bitnami/kafka设置自定义参数(numPartitions,defaultReplicationFactor))

转载 作者:bug小助手 更新时间:2023-10-28 22:18:11 38 4
gpt4 key购买 nike



I created an Azure K8s cluster.
Then I install the bitnami/kafka by using helm:

我创建了一个Azure K8s集群。然后我使用helm安装bitnami/Kafka:


 helm install kafka bitnami/kafka --set replicaCount=3,provisioning.enabled=true,provisioning.replicationFactor=3,provisioning.numPartitions=3,extraConfig="logRetentionHours=-1,logRetentionBytes=2199023985135,offsetsTopicReplicationFactor=3"

However, if deploy the Kafdrop ui and check the test topic that auto-created when my nestjs project sends the message to kafka cluster, it shows the topic has one Partition and one Replication.

但是,如果部署Kafdrop UI并检查当我的nestjs项目将消息发送到Kafka集群时自动创建的测试主题,它会显示该主题有一个Partition和一个复制。


The custom parameters are not in effect.

自定义参数无效。


Am I missing anything here?

我是不是错过了什么?


更多回答

I highly recommend using a values file, not using set argument. That way you can backup your config outside your local shell history. Beyond that, why bitnami charts over Strimzi? Or Azure Eventhub so you don't need to manage a cluster on your own?

我强烈建议使用值文件,而不是使用set参数。这样你就可以在本地shell历史之外备份你的配置。除此之外,为什么Bitnami图表超过Strimzi?或者Azure EventHub,这样你就不需要自己管理集群了?

优秀答案推荐

You should compare your parameters in this file.

https://github.com/bitnami/charts/blob/main/bitnami/kafka/values.yaml

您应该比较此文件中的参数。Https://github.com/bitnami/charts/blob/main/bitnami/kafka/values.yaml


replicaCount parameter does not exist. The correct parameters are controller.replicaCount, broker.replicaCount, zookeeper.replicaCount.

ReplicaCount参数不存在。正确的参数是Controler.plicaCount、broker.preplicaCount、zookeeper.plicaCount。


extraConfig parameter requires values to be separated from each other by newline or if on one line, must use ;. The correct configuration should be

Extra Config参数要求值之间用换行符分隔,如果在一行上,则必须使用;。正确的配置应为


extraConfig="logRetentionHours=-1;logRetentionBytes=2199023985135;offsetsTopicReplicationFactor=3"

If you want to configure extraConfig parameter on multiple lines, you can refer to here.

In addtion, you can use the following to compare whether the values ​​have been applied.

如果您想在多条线路上配置Extra Config参数,可以参考这里。此外,您还可以使用以下内容来比较是否应用了值​​。


helm template kafka bitnami/kafka > output-default.yaml
helm template kafka bitnami/kafka --set replicaCount=3,provisioning.enabled=true,provisioning.replicationFactor=3,provisioning.numPartitions=3,extraConfig="logRetentionHours=-1,logRetentionBytes=2199023985135,offsetsTopicReplicationFactor=3" > output-custom.yaml

Then, compare 2 files output-default.yaml and output-custom.yaml to check the difference.

然后,比较两个文件输出-default.yaml和输出-定制.yaml以检查差异。


更多回答

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com