Zookeeper 新Kafka豆荚复制品在缩放上找不到CA

noj0wjuj  于 2022-12-09  发布在  Apache
关注(0)|答案(1)|浏览(135)

I have a kubernetes cluster with a kafka zookeeper statefulset that works fine with one pod. However, when for performance reasons I try to scale the statefulset to three pods with the following command:

kubectl scale statefulset <my_zookeper_statefulset> --replicas=3

The two new pods go into an Error and then a CrashLoopBackOff with the following logs:

Detected Zookeeper ID 3
Preparing truststore
Adding /opt/kafka/cluster-ca-certs/ca.crt to truststore /tmp/zookeeper/cluster.truststore.p12 with alias ca
Certificate was added to keystore
Preparing truststore is complete
Looking for the right CA
No CA found. Thus exiting.

The certificate in question exists and is used by the existing pod without problem. The same error occurs when I try to scale my kafka brokers.
Tl;dr: How do I scale kafka up without error?

r6hnlfcb

r6hnlfcb1#

当你使用Kafka时,你不能这样做。要这样做,你需要在你的文件中配置replica参数。Kafka资源的spec属性示例:

apiVersion: YourVersion
kind: Kafka 
metadata: 
  name: my-cluster
spec: 
  kafka: 
    replicas: 3

其次,您还可以创建ReplicationController Service,以便轻松处理副本。

相关问题