参考网址:All-in-One Installation of Kubernetes and KubeSphere on Linux
1、下载kk软件
# 安装必须的软件 sudo apt-get install socat conntrack ebtables ipset # 因为是国内,可以直接下载kk软件 wget https://kubernetes.pek3b.qingstor.com/kubekey/releases/download/v2.2.0/kubekey-v2.2.0-linux-amd64.tar.gz # 解压 tar -xzf kubekey-v2.2.0-linux-amd64.tar.gz chmod +x kk
2、参考官方网址进行操作
3、安装完成后,按照终端上提示进行操作
# To start using your cluster, you need to run the following as a regular user: mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config # Alternatively, if you are the root user, you can run: export KUBECONFIG=/etc/kubernetes/admin.conf