通过 Air-Gap 方式安装 k3s
下载离线包
https://github.com/k3s-io/k3s/releases 下载 k3s 命令与 k3s-airgap-images-amd64.tar 离线包
https://g.1ab.asia/是github加速地址,如果失效可以进行更换
sudo wget https://g.1ab.asia/https://github.com/k3s-io/k3s/releases/download/v1.35.3%2Bk3s1/k3s
sudo wget https://g.1ab.asia/https://github.com/k3s-io/k3s/releases/download/v1.35.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://g.1ab.asia/https://github.com/k3s-io/k3s-selinux/releases/download/v1.4.stable.1/k3s-selinux-1.4-1.el8.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