确定Linux版本
lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
确定k8s版本
kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
git下载helm
wget https://get.helm.sh/helm-v2.16.10-linux-amd64.tar.gz
tar -zxvf helm-v2.16.10-linux-amd64.tar.gz
cp linux-amd64/helm /usr/bin/
root@ABCCCDE:~# helm
The Kubernetes package manager
To begin working with Helm, run the 'helm init' command:
$ helm init
This will install Tiller to your running Kubernetes cluster.
It will also set up any necessary local configuration.
Common actions from this point include:
- helm search: Search for charts
- helm fetch: Download a chart to your local directory to view
- helm install: Upload the chart to Kubernetes
- helm list: List releases of charts
下载tiller镜像,国内aliyuncs可用
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.16.6
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.16.6 gcr.io/kubernetes-helm/tiller:v2.16.6
docker rmi registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.16.6
helm ini
helm init --upgrade --tiller-image gcr.io/kubernetes-helm/tiller:v2.16.6
完成!