-
Download offline image package
Offline image package download addressBecause my environment is CentOS 7.7, so download the two in the red box
Download Deployment Script
Deployment Script Download Address (https://get.k3s.io) -
After uploading the prepared file to the server, put the k3s binary file and image package into the specified directory (executed on each node)
$ mkdir -p /var/lib/rancher/k3s/agent/images/ $ cp ./k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/ $ chmod +x k3s $ cp ./k3s /usr/local/bin/
-
Install k3s on the control node
$ chmod +x install.sh $ INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh
-
Add a node to the cluster
to get node-token$ cat /var/lib/rancher/k3s/server/node-token
Assign the token in the previous step to the node-token
master-ip in the command below and replace it with the IP of the control node$ INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://{ master-ip}:6443 K3S_TOKEN=${node-token} ./install.sh
-
View the final deployment result
K3s offline deployment
Guess you like
Origin blog.csdn.net/weixin_45804031/article/details/127876808
Recommended
Ranking