前提
已安装helm https://blog.csdn.net/weixin_42555971/article/details/124325570
已安装K8S集群 https://blog.csdn.net/weixin_42555971/article/details/123897590
配置 Kubectl
下载 Kubectl 工具
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.4/bin/linux/amd64/kubectl
安装 Kubectl 工具
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
测试安装结果
kubectl version
如若输出类似以下版本信息,即表示安装成功
Client Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.4”, GitCommit:“c96aede7b5205121079932896c4ad89bb93260af”, GitTreeState:“clean”, BuildDate:“2020-06-17T11:41:22Z”, GoVersion:“go1.13.9”, Compiler:“gc”, Platform:“linux/amd64”} E

配置 Kubeconfig
获取 Kubeconfig  
保存
vi ~/.kube/config
设置
export KUBECONFIG=~/.kube/config
?
访问测试
kubectl config get-contexts
kubectl get node
kubectl 已安装成功 
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 create nginx
打包
helm package nginx
部署
helm install nginx nginx-0.1.0.tgz -n demo

|