注意: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