minikube
Minikube
安装minikube阿里修改版的
1
2
3
4curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 && \
chmod +x minikube && \
sudo mv minikube /usr/local/bin/1
2
3curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.30.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
安装 xhyve(已经被弃用)1
2
3
4brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve安装 hyperkit参考: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver https://blog.arkey.fr/2018/06/18/minikube-with-hyperkit/
1
2
3
4
5
6
7curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \
&& chmod +x docker-machine-driver-hyperkit \
&& sudo mv docker-machine-driver-hyperkit /usr/local/bin/ \
&& sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \
&& sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit
下载 kubectl
1
2brew install kubectl
启动配置有问题可以 rm -rf ~/.minikube 后重新启动 ,修改驱动会导致失败
1
2minikube start --vm-driver=hyperkit --registry-mirror=https://registry.docker-cn.com --alsologtostderr --v 10
验证配置
1
2kubectl cluster-info
使用mimikube相同的Docker 主机镜像
1 | eval $(minikube docker-env) #设置 |
1 | kubectl config get-contexts #获取k8s环境 |
打开控制面板
1 | minikube dashboard |
minikube