介绍

Minikube 是 K8S 官方为了开发者能在个人电脑上运行 K8S 而提供的一套工具。实现上是通过 Go 语言编写,通过调用虚拟化管理程序,创建出一个运行在虚拟机内的单节点集群。

注:从这里也可以看出,对于 K8S 集群的基本功能而言,节点数并没有什么限制。只有一个节点同样可以创建集群。

大家在实际开发和体验 Kubernetes时,可能会遇到网络访问的原因或者其他的坑导致很多朋友无法使用minikube进行实验。因此我通过撰写这篇博客,让大家少走一点弯路。阿里云提供了一个修改版的Minikube,可以从阿里云的镜像地址来获取Docker镜像和配置。

坑位盘点

  1. unable to cache ISO: connection failed because connected host has failed to respond.

    终端报错信息:

    minikube start
    
    o   minikube v0.35.0 on windows (amd64)
    >   Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
    @   Downloading Minikube ISO ...
    !   Unable to start VM: unable to cache ISO: https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: failed to download: failed to download to temp file: download failed: 5 error(s) occurred
    :
    
    * Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did no
    t properly respond after a period of time, or established connection failed because connected host has failed to respond.
    * Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did no
    t properly respond after a period of time, or established connection failed because connected host has failed to respond.
    * Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did no
    t properly respond after a period of time, or established connection failed because connected host has failed to respond.
    * Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did no
    t properly respond after a period of time, or established connection failed because connected host has failed to respond.
    * Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did no
    t properly respond after a period of time, or established connection failed because connected host has failed to respond.
    

    报错原因: 由于无法从外网下载Minikube ISO出现如上报错。

    解决办法: 修改镜像地址为国内资源,解决网络错误。

  2. Minikube doesn\’t run on VirtualBox

    终端报错信息:

    minikube start
    
    
版权声明:本文为sanshengshui原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/sanshengshui/p/11228985.html