K8S部署Kafka界面管理工具(kafkamanager)方法详解

本站所有内容来自互联网收集,仅供学习和交流,请勿用于商业用途。如有侵权、不妥之处,请第一时间联系我们删除!Q群:迪思分享
免费资源网 – https://freexyz.cn/

kafka-manager 是雅虎开源的apache-kafka管理工具,是用Scala编写的,可以在web页面进行kafka的相关操作。

一、制作kafkamanager的image镜像

下载kafka-manager-2.0.0.2.zip,在解压目录的conf下的application.conf文件里,修改kafka-manager.zkhosts地址和cmake.zkhosts地址为:

zok-0.zk-hs.wiseco.svc.cluster.local:2181,zok-1.zk-hs.wiseco.svc.cluster.local:2181,zok-2.zk-hs.wiseco.svc.cluster.local:2181

[root@k8s-storage01 kafkamanager]# pwd
/home/k8s_deploy/fin/online/deploy/kafkamanager

[root@k8s-storage01 kafkamanager]# ll
total 59228
-rw-r–r– 1 root root 353 Jan 27 17:42 Dockerfile
-rw-r–r– 1 root root 60639694 Jan 27 17:48 kafka-manager-2.0.0.2.zip

[root@k8s-storage01 kafkamanager]# unzip kafka-manager-2.0.0.2.zip
[root@k8s-storage01 kafkamanager]# ll
total 59228
-rw-r–r– 1 root root 353 Jan 27 17:42 Dockerfile
drwxr-xr-x 6 root root 4096 Jan 27 18:09 kafka-manager-2.0.0.2
-rw-r–r– 1 root root 60639694 Jan 27 17:48 kafka-manager-2.0.0.2.zip
[root@k8s-storage01 kafkamanager]# cd kafka-manager-2.0.0.2/conf/
[root@k8s-storage01 conf]# vim application.conf
………..
………..
kafka-manager.zkhosts=”zok-0.zk-hs.wiseco.svc.cluster.local:2181,zok-1.zk-hs.wiseco.svc.cluster.local:2181,zok-2.zk-hs.wiseco.svc.cluster.local:2181″
………..
………..
basicAuthentication.enabled=true #这里启用了用户密码登录,默认false不启用 (除了这里启用用户登录, 后面也可以启用ldap)
basicAuthentication.enabled=${?KAFKA_MANAGER_AUTH_ENABLED}
………..
………..
basicAuthentication.username=”admin”
basicAuthentication.username=${?KAFKA_MANAGER_USERNAME}
basicAuthentication.password=”AdMin@123″ #修改用户登录密码
basicAuthentication.password=${?KAFKA_MANAGER_PASSWORD}
………..
………..

重新打包
[root@k8s-storage01 conf]# cd ../../
[root@k8s-storage01 kafkamanager]# ll
total 59228
-rw-r–r– 1 root root 353 Jan 27 17:42 Dockerfile
drwxr-xr-x 6 root root 4096 Jan 27 18:09 kafka-manager-2.0.0.2
-rw-r–r– 1 root root 60639694 Jan 27 17:48 kafka-manager-2.0.0.2.zip

[root@k8s-storage01 kafkamanager]# rm -rf kafka-manager-2.0.0.2.zip
[root@k8s-storage01 kafkamanager]# tar -zvcf kafka-manager-2.0.0.2.tar.gz kafka-manager-2.0.0.2

[root@k8s-storage01 kafkamanager]# rm -rf kafka-manager-2.0.0.2
[root@k8s-storage01 kafkamanager]# ll
total 58000
-rw-r–r– 1 root root 353 Jan 27 17:42 Dockerfile
-rw-r–r– 1 root root 59387703 Jan 27 18:13 kafka-manager-2.0.0.2.tar.gz

制作Dockerfile镜像
[root@k8s-storage01 kafkamanager]# cat Dockerfile
FROM 192.168.10.10/wiseco/jdk1.8.0_192
RUN rm -f /etc/localtime


© 版权声明
THE END
★喜欢这篇文章吗?喜欢的话,麻烦动动手指支持一下!★
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容