一 初识Helm
1.概述
Helm是k8s的包管理工具,类似Linux系统常用的 apt、yum等包管理工具。
使用helm可以简化k8s应用部署
2.基本概念
Chart:一个 Helm 包,其中包含了运行一个应用所需要的镜像、依赖和资源定义等,还可能包含 Kubernetes 集群中的服务定义,类似 Homebrew 中的 formula、APT 的 dpkg 或者 Yum 的 rpm 文件。
Release:在 Kubernetes 集群上运行的 Chart 的一个实例。在同一个集群上,一个 Chart 可以安装很多次。每次安装都会创建一个新的 release。例如一个 MySQL Chart,如果想在服务器上运行两个数据库,就可以把这个 Chart 安装两次。每次安装都会生成自己的 Release,会有自己的 Release 名称。
Repository:用于发布和存储 Chart 的存储库。
3.架构
二 Helm安装
1 下载安装包
https://github.com/helm/helm/releases
2.解压二进制包
tar zxf helm-v2.13.1-linux-amd64.tar.gz #你会得到一个linux-amd64的文件目录。
3.将linux-amd64里面的可执行文件helm复制到/usr/bin/
[root@server2 ~]# cp linux-amd64/helm /usr/bin/
4.设置helm命令补齐
[root@server2 ~]# echo "source <(helm completion bash)" >> ~/.bashrc
[root@server2 ~]# source ~/.bashrc
5.添加helm仓库
[root@server2 ~]# helm search hub wordpress
URL CHART VERSION APP VERSION DESCRIPTION
https://hub.helm.sh/charts/kube-wordpress/wordp... 0.1.0 1.1 this is my wordpress package
https://hub.helm.sh/charts/bitnami/wordpress 12.0.1 5.8.0 Web publishing platform for building blogs and ...
https://hub.helm.sh/charts/groundhog2k/wordpress 0.4.0 5.8.0-apache A Helm chart for Wordpress on Kubernetes
https://hub.helm.sh/charts/bitnami-aks/wordpress 12.0.1 5.8.0 Web publishing platform for building blogs and ...
https://hub.helm.sh/charts/securecodebox/old-wo... 2.9.1 4.0 Insecure & Outdated Wordpress Instance: Never e...
https://hub.helm.sh/charts/wordpressmysql/wordp... 1.0.0 This is the Helm Chart that creates the Wordpre...
https://hub.helm.sh/charts/presslabs/wordpress-... 0.11.0-alpha.2 0.11.0-alpha.2 Presslabs WordPress Operator Helm Chart
https://hub.helm.sh/charts/presslabs/wordpress-... 0.11.0-rc.2 v0.11.0-rc.2 A Helm chart for deploying a WordPress site on ...
https://hub.helm.sh/charts/phntom/binaryvision-... 0.0.3 0.0.3 www.binaryvision.co.il static wordpress
https://hub.helm.sh/charts/gh-shesselink81-publ..