安装容器运行时
1、若您安装过docker,需要先删掉,之后再安装依赖
sudo apt-get remove docker docker-engine docker.io
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
2、根据版本不同,运行公钥,添加软件仓库
curl -fsSL https://repo.huaweicloud.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
3、更新索引文件并安装
sudo apt-get update
# sudo apt-cache madison docker-ce
sudo apt-get install docker-ce="5:20.10.18~3-0~ubuntu-focal"
4、配置docker加速
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
sudo systemctl restart docker.service
安装Kubectl工具
1、配置kubernetes源
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
sudo add-apt-repository "deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main"
2、 安装Kubectl
sudo apt-get update
# sudo apt-cache madison kubectl
sudo apt install kubectl="1.22.7-00"
安装Minikube
1、安装minikube
sudo curl -Lo minikube https://github.com/kubernetes/minikube/releases/download/v1.28.0/minikube-linux-amd64 && \
sudo chmod +x minikube && \
sudo mv minikube /usr/local/bin/
2、启动minikube
minikube start --driver='docker' --registry-mirror=https://registry.docker-cn.com --kubernetes-version=v1.22.7
确保执行用户具有docker权限
3、启用dashboard
minikube addons enable dashboard
标签:https,minikube,get,sudo,apt,How,Minikube,docker,20.04
From: https://www.cnblogs.com/kntvops/p/16902852.html