学习 Kubernetes(二):Minikube

安装

使用 Homebrew 安装 Minikube:

brew cask install minikube

启动

在 VirtualBox 上使用国内 Docker 镜像启动 V1.15.1 版本 Kubernetes 集群虚拟机 :

minikube start --image-mirror-country cn --kubernetes-version v1.15.1

操作

启动 Dashboard:

minikube dashboard

Trouble Shooting

下载 ISO 文件失败

报错信息:

:bomb:  Failed to cache ISO
:x:  Error:         [ISO_DOWNLOAD_FAILED] https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso: failed to download: failed to download to temp file: failed to create validator: failed to create validator: failed to download checksum file: Get https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso.sha256: read tcp 10.18.0.242:56742->172.217.160.112:443: read: connection reset by peer
:bulb:  Advice:        A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.
:blue_book:  Documentation: https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md
:interrobang:   Related issues:
    ▪ https://github.com/kubernetes/minikube/issues/3922

由于众所周知的原因,中国大陆地区无法下载 ISO 文件。自己提供了一个 ISO 源,添加以下参数:

--iso-url http://cloud.muziyuchen.com/index.php/s/wiPpFt3QUF5ZWEC/download

参考