3分钟在Mac快速搭建Kubernetes环境

1.安装Virtualbox

# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# brew cask install virtualbox

2.安装minikube

# curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.7.1/minikube-darwin-amd64

# chmod +x minikube

# sudo mv minikube /usr/local/bin/

2.1启动minikube

# minikube start

# minikube status

3.安装kubectl命令行接口

# curl -Lo kubectl http://storage.googleapis.com/kubernetes-release/release/v1.3.0/bin/darwin/amd64/kubectl

# chmod +x kubectl

# sudo mv kubectl /usr/local/bin/

get pods

# kubectl get pods --all-namespaces

设置环境变量

# eval $(minikube docker-env)

推荐阅读更多精彩内容