目录

一、安装篇

二、配置仓库篇

三、执行helm警告kube/config文件不安全问题

四、helm 自动补全命令

五、安装、卸载软件


HELM 是k8的包管理工具 ,像linux系统的包管理器,如yum,apt等,很方便的把yaml 文件部署到k8s上面!

一、安装篇

1.helm包下载地址:

wget https://get.helm.sh/helm-v3.6.1-linux-amd64.tar.gz

2.解压 && 移动到 /usr/bin 目录下:

tar -xvf helm-v3.6.1-linux-amd64.tar.gz && cd linux-amd64/ && mv helm /usr/bin 

3.执行 helm 显示如下说明安装成功:

#查看版本
helm version

二、配置仓库篇

#添加公用的仓库

helm repo add incubator https://charts.helm.sh/incubator

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

# 配置helm微软源地址
helm repo add stable http://mirror.azure.cn/kubernetes/charts

# 配置helm阿里源地址

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

# 查看仓库

helm repo list

# 更新仓库

helm repo update  

# 删除仓库

helm repo remove  aliyun

三、执行helm警告kube/config文件不安全问题

# helm 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
 

解决

chmod g-rw ~/.kube/config
chmod o-r ~/.kube/config

四、helm 自动补全命令
 

source <(helm completion bash)

echo "source <(helm completion bash)" >> ~/.bashrc
source /usr/share/bash-completion/bash_completion

五、安装、卸载软件

1.查看nginx包

helm search repo nginx

2.安装 、删除 nginx

  • rwnginx 自定义的应用名称

  • bitnami/nginx search中的NAME,要安装哪个应用,这里就指定search结果中的应用名称,也就是上图中红色部分

helm install rwnginx bitnami/nginx

#卸载应用:

helm uninstall nginx

#删除应用

helm delete test123

3.查看安装好的应用列表

helm list

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐