DevOps
程序员文章站
2022-07-14 11:26:51
...
1.新建用户
sudo groupadd docker
sudo useradd -m -g docker kube
sudo passwd kube
sudo vi /etc/sudoers(kube ALL=(ALL:ALL) ALL)
su kube
2.安装 docker
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker -v
3.安装 docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
4.安装 daemonize
sudo apt-get install daemonize
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
5.net.ipv4.ip_forward=1
sudo vi /etc/sysctl.conf(net.ipv4.ip_forward=1)
sudo sysctl -p
6.安装 minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube config set driver docker
minikube kubectl proxy
minikube start
minikube dashboard
7.
上一篇: devops
下一篇: DevOps与阿里云容器服务(二)
推荐阅读