|NO.Z.00274|——————————|^^ 部署 ^^|——|KuberNetes&中间件容器化及helm.V21|——|中间件.v01|helm.v3.5.4|直接部署|zookeeper&kafka|

一、部署zookeeper和kafka集群概述
### --- zookeeper和kafka的官方地址

~~~     https://docs.bitnami.com/tutorials/deploy-scalable-kafka-zookeeper-cluster-kubernetes
~~~     使用的是bitnami开源项目来做的
~~~     bitnami提供了一些比较复杂的项目,一键式安装这些复杂工具
二、使用helm部署zookeeper和kafka;直接部署
### --- 添加bitnami的helm仓库并添加版本库
~~~     添加bitnami的helm仓库

[root@k8s-master01 zookeeper-kafka]# helm repo add bitnami https://charts.bitnami.com/bitnami
### --- 查看添加的仓库

[root@k8s-master01 zookeeper-kafka]# helm repo list
NAME            URL                                                              
bitnami         https://charts.bitnami.com/bitnami 
### --- 查看bitnami仓库下zookeeper和kafka的程序包
~~~     注:可以直接安装,也可以下载后更改values值后安装

[root@k8s-master01 zookeeper-kafka]# helm search repo zookeeper
NAME                        CHART VERSION   APP VERSION DESCRIPTION                                       
bitnami/zookeeper           6.7.2           3.7.0       A centralized service for maintaining configura...
bitnami/kafka               12.18.1         2.8.0       Apache Kafka is a distributed streaming platform. 
### --- 使用helm直接安装zookeeper和kafka
### --- 直接安装
~~~     注:可以指定namespace
~~~     注:若是生产环境下:集群副本数更改为3,打开metrics,可以让promise可以采集它的一些信息

[root@k8s-master01 zookeeper-kafka]# helm install zookeeper bitnami/zookeeper --set replicaCount=1 --set auth.enabled=false --set allowAnonymousLogin=true
[root@k8s-master01 zookeeper-kafka]# helm install zookeeper bitnami/kafka --set replicaCount=1 --set auth.enabled=false --set allowAnonymousLogin=true
~~~     注:
  --set replicaCount=3                   // 副本数设置为1
  --set auth.enabled=false               // 认证方式关闭;因为zookeeper集群不会暴露到公网,所以认证方式给关闭
  --set allowAnonymousLogin=true         // 允许匿名访问

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(107)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示