赞
踩
官方文档
minikube start
参考使用国内源文档
Install Docker Engine on Ubuntu
自行配置镜像加速
按照以上官网安装遇到错误
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
干脆,改用 apt 安装
$ docker -v
Command 'docker' not found, but can be installed with:
sudo snap install docker # version 20.10.8, or
sudo apt install docker.io
See 'snap info docker' for additional versions.
说明:apt 安装的是 docker.io ,不是 docker-ce
docker-ce 是 docker 官方维护的
docker.io 是 Debian 团队维护的
docker.io 采用 apt 的方式管理依赖
docker-ce 用 go 的方式管理依赖,会自己管理所有的依赖。
配置阿里云镜像加速器
记得重启服务
sudo systemctl daemon-reload
sudo systemctl restart docker
以上阿里云Kubernetest镜像的方法缺少 sudo 和 kubernetes.list 不太对!
$ sudo apt-get install -y apt-transport-https
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-4.15.0-151 linux-headers-4.15.0-151-generic linux-headers-4.15.0-158 linux-headers-4.15.0-158-generic linux-image-4.15.0-151-generic linux-image-4.15.0-158-generic linux-modules-4.15.0-151-generic linux-modules-4.15.0-158-generic linux-modules-extra-4.15.0-151-generic linux-modules-extra-4.15.0-158-generic Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 85 not upgraded. Need to get 4,348 B of archives. After this operation, 154 kB of additional disk space will be used. Get:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.14 [4,348 B] Fetched 4,348 B in 1s (3,692 B/s) Selecting previously unselected package apt-transport-https. (Reading database ... 186525 files and directories currently installed.) Preparing to unpack .../apt-transport-https_1.6.14_all.deb ... Unpacking apt-transport-https (1.6.14) ... Setting up apt-transport-https (1.6.14) ...
$ sudo curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2537 100 2537 0 0 10659 0 --:--:-- --:--:-- --:--:-- 10659
OK
加入到 apt 源
sudo tee /etc/apt/sources.list.d/kubernetes.list <<-'EOF'
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
$ sudo apt-get update
$ sudo apt-get install -y kubectl
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-4.15.0-151 linux-headers-4.15.0-151-generic linux-headers-4.15.0-158 linux-headers-4.15.0-158-generic linux-image-4.15.0-151-generic linux-image-4.15.0-158-generic linux-modules-4.15.0-151-generic linux-modules-4.15.0-158-generic linux-modules-extra-4.15.0-151-generic linux-modules-extra-4.15.0-158-generic Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: kubectl 0 upgraded, 1 newly installed, 0 to remove and 85 not upgraded. Need to get 9,057 kB of archives. After this operation, 46.9 MB of additional disk space will be used. Get:1 https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial/main amd64 kubectl amd64 1.22.4-00 [9,057 kB] Fetched 9,057 kB in 3s (3,516 kB/s) Selecting previously unselected package kubectl. (Reading database ... 186529 files and directories currently installed.) Preparing to unpack .../kubectl_1.22.4-00_amd64.deb ... Unpacking kubectl (1.22.4-00) ... Setting up kubectl (1.22.4-00) ...
按照官方文档组合出来的命令·
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
安装
sudo install minikube-linux-amd64 /usr/local/bin/minikube
启动
$ minikube start --image-mirror-country=‘cn’
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/830652
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。