Kafka Eagle (kafka-eagle.org)
smartloli/kafka-eagle: A easy and high-performance monitoring system, for comprehensive monitoring and management of kafka cluster. (github.com)
首先我们下载下来,然后解压
在bin目录,新建一个entrypoint.sh文件
sh /eagle/bin/ke.sh start
tail -f /eagle/logs/log.log
然后修改配置文件system-config.properties
sql lite改为
kafka.eagle.url=jdbc:sqlite:/eagle/db/ke.db
cluster修改
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=kafka-zookeeper:2181
编写dockerfile,要么jdk,不要使用jre
FROM openjdk:8-jdk-alpine
COPY eagle /eagle
ENV KE_HOME=/eagle
ENV PATH=$PATH:$KE_HOME/bin
EXPOSE 8048
CMD ["sh","/eagle/bin/entrypoint.sh"]
然后做镜像
docker build -t taihu/eagle:3.1 .
编写eagle.yaml部署文件
apiVersion: apps/v1
kind: Deployment
metadata:
name: eagle
spec:
selector:
matchLabels:
app: eagle
template:
metadata:
labels:
app: eagle
spec:
containers:
- image: taihu/eagle:3.1
name: eagle
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8048
name: eagle-web
这里没有弄service,手动在界面做吧
执行下面这个命令在k3s里部署
kubectl apply -f eagle.yaml -n kf
执行成功之后,在k3s里手动建一个service
然后在浏览器里打开http://10.43.252.210:8048/
漂亮的eagle出来了