Kubernetes目前最高支持Docker版本17.03javascript
Minikube是一種方便在本地運行Kubernetes的工具.
Minikube 是能夠在VM中運行單節點的Kubernetes集羣.
Minikube是爲了開發或測試在本地啓動一個節點的kubernetes集羣.java
不能啓動生產集羣,沒有高可用性的單節點機器.
能夠工做在Windows,Linux,MacOS下.node
須要安裝VirtualBox和Minikubelinux
$curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
git
% Total % Received % Xferd Average Speed Time Time Time Current
github
Dload Upload Total Spent Left Speed
docker
100 82.3M 100 82.3M 0 0 4295k 0 0:00:19 0:00:19 --:--:-- 4896k
centos
$curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl
api
% Total % Received % Xferd Average Speed Time Time Time Current
網絡
Dload Upload Total Spent Left Speed
100 68.9M 100 68.9M 0 0 4756k 0 0:00:14 0:00:14 --:--:-- 5385k
$ sudo mv kubectl /usr/local/bin/
$ export MINIKUBE_WANTUPDATENOTIFICATION=false
$ export MINIKUBE_WANTREPORTERRORPROMPT=false
$ export MINIKUBE_HOME=$HOME
$ export CHANGE_MINIKUBE_NONE_USER=true
$ mkdir $HOME/.kube || true
$ touch $HOME/.kube/config
$ export KUBECONFIG=$HOME/.kube/config
$ minikube start --vm-driver=virtualbox
Starting local Kubernetes v1.7.0 cluster...
Starting VM...
Downloading Minikube ISO
97.80 MB / 97.80 MB [==============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
$ kubectl get nodes
NAME STATUS AGE VERSION
minikube Ready 5s v1.7.0
$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system kube-addon-manager-minikube 1/1 Running 0 2h
kube-system kube-dns-910330662-pkvj6 3/3 Running 0 2h
kube-system kubernetes-dashboard-mg5jt 1/1 Running 0 2h
若是minikube啓動提示沒有找到VboxManage,能夠參考Github上的方法:
此參數告訴Kubernetes組件運行在主機上,而非VM虛擬機上。
若是運行在VM上,Docker只須要VM的驅動程序,而非管理程序。
使用主機模式,請確保Docker的網絡鏈接模擬爲橋接(bridge network)。
[javascript] view plain copy
卸載Docker高版本
一、查看已安裝的Docker版本
$ yum list installed | grep docker
二、卸載已安裝的Docker版本
yum -y remove docker-ce.x86_64
三、查看Docker版本
yum list docker-ce.x86_64 --showduplicates |sort -r
docker-ce.x86_64 18.05.0.ce-3.el7.centos docker-ce-edge
docker-ce.x86_64 18.04.0.ce-3.el7.centos docker-ce-edge
docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 18.02.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 18.01.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.11.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.10.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.07.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.05.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.04.0.ce-1.el7.centos docker-ce-edge
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
四、安裝Docker 17.03.0.ce
yum install -y docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch