先从 https://github.com/k3s-io/k3s/releases 下载 k3s 命令与 k3s-airgap-images-amd64.tar 离线包
wget https://github.com/k3s-io/k3s/releases/download/v1.23.3%2Bk3s1/k3s wget https://github.com/k3s-io/k3s/releases/download/v1.23.3%2Bk3s1/k3s-airgap-images-amd64.tar curl -o install.sh https://get.k3s.io sudo chmod +x k3s sudo chmod +x install.sh
安装必要的系统环境
sudo yum install -y container-selinux sudo yum install -y https://rpm.rancher.io/k3s/stable/common/centos/7/noarch/k3s-selinux-0.4-1.el7.noarch.rpm
然后就可以开始准备安装
sudo mkdir -p /var/lib/rancher/k3s/agent/images/ sudo cp k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/ sudo cp k3s /usr/local/bin/ INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh