Helm

helm
类似yum

helm下载的是配置清单文件


核心术语:
Chart:一个helm程序包;
Repository:Charts仓库,https/http服务器;
Release:特定的Chart部署于目标集群上的一个实例;
Chart -> Config -> Release
程序架构:
helm:客户端,管理本地的Chart仓库,管理Chart, 与Tiller服务器交互,发送Chart,实例安装、查询、卸载等
操作
Tiller:服务端,接收helm发来的Charts与Config,合并生成relase;

 

#安装helm
github
https://github.com/helm/helm

#下载
wget https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-linux-amd64.tar.gz
#解压
tar xf helm-v2.9.1-linux-amd64.tar.gz 
#查看
[root@k8s-m heml]# cd linux-arm64/
[root@k8s-m linux-arm64]# ll
总用量 66876
-rwxr-xr-x 1 root root 34395552 12月 20 07:09 helm
-rw-r--r-- 1 root root    11343 12月 20 07:11 LICENSE
-rw-r--r-- 1 root root     3138 12月 20 07:11 README.md
-rwxr-xr-x 1 root root 34063008 12月 20 07:10 tiller
#
[root@k8s-m linux-arm64]#  cp helm  /usr/bin/

#查看
helm  -h



RBAC配置文件示例:
https://github.com/helm/helm/blob/master/docs/rbac.md

#创建角色与rbac授权
[root@k8s-m linux-amd64]# cat  rbac-config.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system
#导入
 kubectl  apply -f rbac-config.yaml 
#查看
[root@k8s-m linux-amd64]# kubectl  get sa -n kube-system|grep tiller
tiller                               1         47s
#helm初始化
helm init --service-account tiller

[root@k8s-m linux-amd64]# helm init --service-account tiller
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /root/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!

 

#测试使用

[root@k8s-m linux-amd64]# helm search redis
NAME CHART VERSION APP VERSION DESCRIPTION
stable/prometheus-redis-exporter 1.0.0 0.22.1 Prometheus exporter for Redis metrics
stable/redis 5.1.3 4.0.12 Open source, advanced key-value store. It is of...
stable/redis-ha 3.0.3 4.0.11 Highly available Kubernetes implementation of R...
stable/sensu 0.2.3 0.28 Sensu monitoring framework backed by the Redis ...

官方可用的Chart列表:
https://hub.kubeapps.com/
helm常用命令:(使用和yum类似)
	release管理:
	install #下
	delete  #删除
	upgrade/rollback   #更新与回滚
	list  #列出下载列表
	history:release的历史信息;
	status:获取release状态信息;
	inspect  #查看详细信息
chart管理:
	create 
	fetch
	get
	inspect
	package
	verify
	incubator

  

转载于:https://www.cnblogs.com/zhangb8042/p/10205551.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值