注意:mac上要提早安装virtualbox,安装过程挺简单的。html
List-1 从http连接中能够看出用的是阿里云的,不是google的node
curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.28.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
执行List-1中的命令,下载完须要的东西后,会提示输入当前用户的密码。linux
以后咱们查看下minikube,以下docker
List-2shell
mjduan@mjduandeMacBook-Pro:~/Docker % minikube Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows. Usage: minikube [command] Available Commands: addons Modify minikube's kubernetes addons cache Add or delete an image from the local cache. completion Outputs minikube shell completion for the given shell (bash or zsh) ......
执行"minikube start --registry-mirror=https://registry.docker-cn.com",以下List-3所示浏览器
List-3 会下载kubelet、kubeadminbash
mjduan@mjduandeMacBook-Pro:~/Docker % minikube start --registry-mirror=https://registry.docker-cn.com Starting local Kubernetes v1.10.0 cluster... Starting VM... Downloading Minikube ISO 153.08 MB / 153.08 MB [============================================] 100.00% 0s Getting VM IP address... Moving files into cluster... Downloading kubeadm v1.10.0 Downloading kubelet v1.10.0 Finished Downloading kubeadm v1.10.0 Finished Downloading kubelet v1.10.0 Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. Loading cached images from config file.
查看下minikube的版本,以下List-4curl
List-4ui
mjduan@mjduandeMacBook-Pro:~/Docker % kubectl version Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
List-5google
mjduan@mjduandeMacBook-Pro:~/Docker % minikube dashboard Waiting, endpoint for service is not ready yet... Waiting, endpoint for service is not ready yet... Opening kubernetes dashboard in default browser...
以后minikube会自动在浏览器中打开界面,以下
图1 kubernates的界面
注意:好像不须要提早安装kubectl,minikube会自动下载安装。
http://192.168.99.100:30000/#!/role?namespace=default
1.阿里云社区博客: https://yq.aliyun.com/articles/221687