ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Helm 应用管理部署

2022-05-02 03:01:21  阅读:182  来源: 互联网

标签:Kubernetes 部署 config helm master 应用 Helm kube root


Kubernetes 包管理器
简介:

官网

https://helm.sh/zh/docs
https://www.qikqiak.com/k8strain2/helm
https://github.com/helm/helm/releases

应用中心

https://artifacthub.io

helm ui管理

https://kubeapps.com

二进制部署
https://helm.sh/zh/docs/intro/quickstart
https://github.com/helm/helm/releases

wget https://get.helm.sh/helm-v3.6.0-linux-amd64.tar.gz
tar xf helm-v3.6.0-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/

本地脚本直接部署

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

直接运行安装

curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

命令行自动补全

1、临时生效

source <(helm completion bash)

2、写配置文件

echo "source <(helm completion bash)" >>  ~/.bash_profile 

3、bash-completion添加配置

helm completion bash > /usr/share/bash-completion/completions/helm

4、添加helm仓库

helm repo add bitnami https://charts.bitnami.com/bitnami

5、查看所有仓库

[root@master ~]# helm repo list
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME            URL
rancher-latest  https://releases.rancher.com/server-charts/latest
jetstack        https://charts.jetstack.io
bitnami         https://charts.bitnami.com/bitnami

6、更新仓库

[root@master ~]# helm repo update
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "rancher-latest" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
[root@master ~]#

7、查询

[root@master ~]# helm search repo stable/mysql
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
stable/mysql            1.6.8           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysqldump        2.6.2           2.4.1           DEPRECATED! - A Helm chart to help backup MySQL...
[root@master ~]#
[root@master ~]# helm search repo stable/mysql -l
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
stable/mysql            1.6.8           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.7           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.6           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.5           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.4           5.7.30          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.3           5.7.28          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.2           5.7.28          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.1           5.7.27          Fast, reliable, scalable, and easy to use open-...
stable/mysql            1.6.0           5.7.27          Fast, reliable, scalable, and easy to use open-...

8、helm chart包结构

[root@master ~]# helm create test
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
[root@master ~]# cd test/
[root@master test]#
[root@master test]# ls -l
total 8
drwxr-xr-x 1 root root  512 May 29 10:09 charts
-rw-r--r-- 1 root root 1140 May 29 10:09 Chart.yaml
drwxr-xr-x 1 root root  512 May 29 10:09 templates
-rw-r--r-- 1 root root 1871 May 29 10:09 values.yaml

9、helm插件安装

[root@master ~]# helm plugin install https://github.com/chartmuseum/helm-push
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
Downloading and installing helm-push v0.9.0 ...
https://github.com/chartmuseum/helm-push/releases/download/v0.9.0/helm-push_0.9.0_linux_amd64.tar.gz
Installed plugin: push
[root@master ~]# helm plugin list
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME    VERSION DESCRIPTION
push    0.9.0   Push chart package to ChartMuseum
[root@master ~]#

10、Helm使用时关于kubernetes文件的警告

[root@master kafka]# helm ls
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION
[root@master kafka]# ls -l /root/.kube/config
-rwxrwxrwx 1 root root 5399 Aug  2 15:25 /root/.kube/config
[root@master kafka]# chmod g-rw ~/.kube/config
[root@master kafka]# chmod o-r ~/.kube/config
[root@master kafka]# helm ls
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION
[root@master kafka]#

标签:Kubernetes,部署,config,helm,master,应用,Helm,kube,root
来源: https://www.cnblogs.com/shunzi115/p/16214943.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有