在k8s上部署 zookeeper + kafka 集群的配置文件
时间: 2024-03-17 14:04:51 浏览: 129
好的,以下是一个基本的zookeeper + kafka集群的配置文件示例:
1. Zookeeper配置文件示例:
```
tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
server.1=zookeeper1:2888:3888
server.2=zookeeper2:2888:3888
server.3=zookeeper3:2888:3888
```
2. Kafka配置文件示例:
```
broker.id=0
listeners=PLAINTEXT://kafka1:9092
advertised.listeners=PLAINTEXT://kafka1:9092
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/var/lib/kafka
num.partitions=1
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=3
transaction.state.log.replication.factor=3
transaction.state.log.min.isr=2
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
zookeeper.connection.timeout.ms=6000
```
注意:实际上,以上示例文件中的IP地址和端口号需要根据实际情况进行修改。此外,还需要在每个节点上进行相应的文件配置和软件安装,才能正确部署zookeeper + kafka集群。
阅读全文