k3s
,k3d
,kind
都是轻量级的k8s这里使用Debian Linux演示,其他系统安装见官网,首先要安装驱动docker、kvm2、podman、qemu2和virtualbox其中的一个
#查看是否开启虚拟化,Intel-VT或AMD-V
lscpu | grep Virtualization
#安装curl
sudo apt install curl
#更新
sudo apt-get update
#安装transport-https,允许从https下载包
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
#下载deb包
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
#安装minikube
sudo dpkg -i minikube_latest_amd64.deb
#下载kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
#安装kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
#查看安装
minikube version
kubectl version --client
#卸载
sudo apt remove minikube
sudo rm /usr/local/bin/kubectl
下载报错:Could not resolve host: storage.googleapis.co
#查看解析的ip
https://tool.chinaz.com/dns/storage.googleapis.com
#修改host,改为你解析的ip
sudo vi /etc/hosts
142.251.42.251 storage.googleapis.com