Helm

helm
相似yumlinux

helm下載的是配置清單文件git


核心術語:
Chart:一個helm程序包;
Repository:Charts倉庫,https/http服務器;
Release:特定的Chart部署於目標集羣上的一個實例;
Chart -> Config -> Release
程序架構:
helm:客戶端,管理本地的Chart倉庫,管理Chart, 與Tiller服務器交互,發送Chart,實例安裝、查詢、卸載等
操做
Tiller:服務端,接收helm發來的Charts與Config,合併生成relase;
github

 

#安裝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.redis

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

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!bash

 

#測試使用服務器

[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
相關文章
相關標籤/搜索