只需要一行命令即可安装:
sudo curl -sfL https://get.k3s.io | sh -
### 下面需要编辑 /etc/profile
# 也可以 sudo vim ~/.bashrc
sudo vim /etc/profile
### 将如下代码添加到最后一行保存
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
# 重启服务
sudo systemctl daemon-reload
sudo service k3s restart
安装Helm
wget https://get.helm.sh/helm-v3.5.0-linux-amd64.tar.gz
tar -zxvf helm-v3.5.0-linux-amd64.tar.gz
chmod 755 linux-amd64/helm
sudo cp linux-amd64/helm /usr/bin/
# sudo cp linux-amd64/helm /usr/local/bin/
Helm更换源
导入国外源
helm repo add stable https://charts.helm.sh/stable
helm repo update
导入阿里源
helm repo remove stable
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm repo update
helm list