华为云ubuntu1804安装rancherk8s
apt-get install docker.io
docker version Client: Version: 20.10.21 API version: 1.41 Go version: go1.18.1 Git commit: 20.10.21-0ubuntu1~18.04.3 Built: Thu Apr 27 05:50:21 2023 OS/Arch: linux/amd64 Context: default Experimental: true Server: Engine: Version: 20.10.21 API version: 1.41 (minimum version 1.12) Go version: go1.18.1 Git commit: 20.10.21-0ubuntu1~18.04.3 Built: Thu Apr 27 05:36:22 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.12-0ubuntu1~18.04.1 GitCommit: runc: Version: 1.1.4-0ubuntu1~18.04.2 GitCommit: docker-init: Version: 0.19.0 GitCommit:
或者:
wget https://releases.rancher.com/install-docker/20.10.sh
bash 20.10.sh
echo " net.bridge.bridge-nf-call-iptables=1 " >> /etc/sysctl.conf
sysctl -p
docker run -d --name rancher-2.7.5 --restart=always --privileged -p 80:80 -p 443:443 -v /root/rancher_data:/var/lib/rancher -v /root/rancher_data/kubelet:/var/lib/kubelet rancher/rancher:v2.7.5