您好,登錄后才能下訂單哦!
這篇文章主要介紹了Helm管理工具怎么用,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
一 Helm 簡(jiǎn)介
Helm:
chart: 一個(gè)helm程序包
Repository: Charts倉庫,https/http服務(wù)器
Release:特定的chart部署于目標(biāo)集群上的一個(gè)實(shí)例
Chart -> Config -> Release
helm:客戶端。管理本地Chart倉庫,管理Chart,與Tiller服務(wù)器交互,發(fā)送Chart,實(shí)例安裝,查詢,卸載等操作
Tiller: 服務(wù)端,接收helm發(fā)來的Chart與Config,合并生成Release
二 部署Helm
1 下載helm
wget https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz
2 解壓
tar xf helm-v2.13.1-linux-amd64.tar.gz
3 安裝helm
cd linux-amd64/ mv helm /usr/bin/ # helm version Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"} Error: could not find tiller
4 安裝 tiller
部署tiller對(duì)于開啟rbac認(rèn)真的集群需要進(jìn)行rbac授權(quán)并且綁定在集群級(jí)別的clusterrolebinding
# cat tiller-rbac.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 tiller-rbac.yaml 如果想要部署在特定的名稱該空間使用請(qǐng)參考官網(wǎng) https://github.com/helm/helm/blob/master/docs/rbac.md 查看tiller # kubectl get serviceaccount -n kube-system | grep tiller tiller 1 4m25s
5 初始化tiller
helm init --service-account tiller --history-max 200 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. To prevent this, run `helm init` with the --tiller-tls-verify flag. For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation Happy Helming! 可以預(yù)先設(shè)置下載proxy export HTTPS_PROXY='http://www.ik8s.io:10080' 如果提示失敗并且是連接https://ip:6443超時(shí)可以通過設(shè)置環(huán)境變量 export NO_PROXY='節(jié)點(diǎn)ip/16,回環(huán)地址/16' 再次安裝
6 查看tiller
# kubectl get pod -n kube-system | grep tiller tiller-deploy-876ff889-jjfn9 1/1 Running 0 4m29s # helm version Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
7 helm chart 官方可用倉庫
1) helm.sh 2) hub.kubeapps.com
8 升級(jí)倉庫
helm repo update
9 helm基本使用
1) 查看 某chart # helm search jenkins NAME CHART VERSION APP VERSION DESCRIPTION stable/jenkins 1.1.16 lts Open source continuous integration server. It supports mu... 2) 查看chart的詳細(xì)信息 helm inspect stable/jenkins 3) 安裝某應(yīng)用 helm install --name memcached stable/memcached 4) 卸載某個(gè)應(yīng)用 helm delete memcached 5) 查看應(yīng)用列表 helm list 6) 獲取chart helm get/fatch stable/jenkins 7) 歷史管理 helm history memcached 8)創(chuàng)建chart helm create .. 9) 打包 helm package .. 10) 回滾 helm rollback ... 11) 查看helm版本 helm version 12) 查看狀態(tài) helm status ......通過helm --help 獲取
10 helm家目錄
家目錄主要查看我們使用過的chart
/root/.helm/
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“Helm管理工具怎么用”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。