helm3.5安装

官方文档

Helm | Installing Helm

下载安装包

wget https://get.helm.sh/helm-v3.5.2-linux-amd64.tar.gz
tar zxvf helm-v3.5.2-linux-amd64.tar.gz
cd linux-amd64/
cp helm /usr/bin/helm  我是复制到 /usr/local/bin 下

查看版本

helm version

version.BuildInfo{Version:"v3.5.2", GitCommit:"167aac70832d3a384f65f9745335e9fb40169dc2", GitTreeState:"dirty", GoVersion:"go1.15.7"}

添加共有仓库

helm repo add stable http://mirror.azure.cn/kubernetes/charts
helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts 
helm repo update

指定k8s集群位置

export KUBECONFIG=/root/.kube/config

简单测试

# 生成chart文件

[root@master01 linux-amd64]# helm create one
Creating one

# 打包

[root@master01 linux-amd64]# helm package one
Successfully packaged chart and saved it to: /root/config/helm/linux-amd64/one-0.1.0.tgz

# 安装

[root@master01 linux-amd64]# helm install one one-0.1.0.tgz
NAME: one
LAST DEPLOYED: Tue Mar 2 13:50:05 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=one,app.kubernetes.io/instance=one" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT

[root@master01 linux-amd64]# helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
one default 1 2021-03-02 13:50:05.926498934 +0800 CST deployed one-0.1.0 1.16.0

[root@master01 linux-amd64]# kubectl get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
nfs-client-provisioner 1/1 1 1 11d
one 1/1 1 1 15m

[root@master01 linux-amd64]# helm delete one
release "one" uninstalled

[root@master01 linux-amd64]# helm repo list
NAME URL
stable http://mirror.azure.cn/kubernetes/charts
aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值