使用k8s安装KafkaOffsetMonitor raft版监控。
直接运行以下yaml即可:
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-offset-monitor
namespace: my-space
spec:
replicas: 1
selector:
matchLabels:
tier: kafka-offset-monitor
matchExpressions:
- key: tier
operator: In
values:
- kafka-offset-monitor
template:
metadata:
labels:
app: kafka-offset-monitor
tier: kafka-offset-monitor
spec:
containers:
- name: kafka-offset-monitor
image: 'kubebiz/kafka-offset-monitor:1.0.0'
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- '-c'
- >-
java -jar /opt/KafkaOffsetMonitor-1.0.jar
--broker-list=localhost:9092 --server.port=8080
要修改的是:
--broker-list
:改成你自己的kafka raft集群地址。--server.port
:KafkaOffsetMonitor的启动端口