欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Helm 3.5.3 安装使用

程序员文章站 2024-03-14 13:28:46
...

一、环境

[[email protected] ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.9", GitCommit:"9dd794e454ac32d97cde41ae10be801ae98f75df", GitTreeState:"clean", BuildDate:"2021-03-18T01:09:28Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.9", GitCommit:"9dd794e454ac32d97cde41ae10be801ae98f75df", GitTreeState:"clean", BuildDate:"2021-03-18T01:00:06Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

[[email protected] ~]# docker version
Client: Docker Engine - Community
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        42e35e61f3
 Built:             Mon Jun  1 09:13:48 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       42e35e61f3
  Built:            Mon Jun  1 09:12:26 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

 二、安装

下载软件包 https://get.helm.sh/helm-v3.5.3-linux-amd64.tar.gz

#解压
tar -zxvf helm-3.5.3.tar.gz

#移至目标
mv helm-3.5.3/helm /usr/local/bin/helm

# 验证
helm help 

三、使用

配置国内源

#阿里源
helm repo add aliyun  https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts


#其他源
helm repo add apphub https://apphub.aliyuncs.com/

#验证
[[email protected] ~]# helm repo list
NAME    URL
aliyun  https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
apphub  https://apphub.aliyuncs.com/

#更新
helm repo update

查询应用

#查找应用mysql
[[email protected] ~]# helm search repo mysql
NAME                                    CHART VERSION   APP VERSION     DESCRIPTION
aliyun/mysql                            0.3.5                           Fast, reliable, scalable, and easy to use open-...
apphub/mysql                            6.8.0           8.0.19          Chart to create a Highly available MySQL cluster
apphub/mysqldump                        2.6.0           2.4.1           A Helm chart to help backup MySQL databases usi...
apphub/mysqlha                          1.0.0           5.7.13          MySQL cluster with a single master and zero or ...
apphub/prometheus-mysql-exporter        0.5.2           v0.11.0         A Helm chart for prometheus mysql exporter with...
aliyun/percona                          0.3.0                           free, fully compatible, enhanced, open source d...
aliyun/percona-xtradb-cluster           0.0.2           5.7.19          free, fully compatible, enhanced, open source d...
apphub/percona                          1.2.0           5.7.17          free, fully compatible, enhanced, open source d...
apphub/percona-xtradb-cluster           1.0.3           5.7.19          free, fully compatible, enhanced, open source d...
apphub/phpmyadmin                       4.2.12          5.0.1           phpMyAdmin is an mysql administration frontend
aliyun/gcloud-sqlproxy                  0.2.3                           Google Cloud SQL Proxy
aliyun/mariadb                          2.1.6           10.1.31         Fast, reliable, scalable, and easy to use open-...
apphub/mariadb                          7.3.9           10.3.22         Fast, reliable, scalable, and easy to use open-...
apphub/mariadb-galera                   0.8.1           10.4.12         MariaDB Galera is a multi-master database clust...


 安装应用

helm install aliyun/mysql --generate-name

创建新chart

#创建新Chart
helm create my-hello-world

#验证查看
[[email protected] ~]# tree my-hello-world
my-hello-world
├── charts
├── Chart.yaml
├── templates
│   ├── deployment.yaml
│   ├── _helpers.tpl
│   ├── hpa.yaml
│   ├── ingress.yaml
│   ├── NOTES.txt
│   ├── serviceaccount.yaml
│   ├── service.yaml
│   └── tests
│       └── test-connection.yaml
└── values.yaml

 

四、问题

五、参考文章

https://helm.sh/docs/intro/quickstart/

相关标签: kubernetes kuberctl