k8s 使用operator和heml来管理中间件和服务的部署

使用operator部署有状态的服

operator更适合部署有状态的服务
1.了解你要部署的服务
2.去github和operatorhub上搜。https://operatorhub.io/
3.安装部署

使用henl来管理中间件

Helm来管理包的时候需要安装客户端工具:https://heml.sh/docs/intro/install/
heml Charts仓库:https://artifacthub.io/
添加bitnami和官方henl仓库:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add stable https://charts.helm.sh/stable
安装方式一:先下载后安装

很多镜像都是在公网下载比较困难,需要先将镜像同步到镜像仓库后,再去修改vaules.yaml文件里面的镜像地址。需要修改的配置可以根据直接部署的set命令对应的参数来修改。

helm pull bitnami/zookeeper

修改values.yaml相应配置:副本数、auth、持久化
helm install -n public-service zookeper .

直接安装
 helm install kafka bitnami/kafka --set zookeeper.enable=false --set replicaCount=3 --set externalZookeeper.servers=zookeeper --set persistence.enabled=false -n public-service
基础命令

helm search 查询一个包

helm search repo bitnami/redis

helm pull 下载安装包

helm pull bitnami/kafka

helm create 创建一个包

helm create 程序名称

helm install 安装包

helm install -n public-service kafka .

helm list 查看安装包 有命名空间隔离

helm list -n public-service

helm upgrade 跟新程序

helm upgrade  -n  public-service kafka .

helm delete 删除安装程序

helm delete  -n  public-service kafka .
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值