|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 2022-03-31 13:34  yanqi_vip  阅读(125)  评论(0)    收藏  举报

导航