• minikube国内访问网络问题处理


    minikube所需的镜像在拉取时,要求网络能够访问k8s.gcr.io。而此地址属于著名的404公司,在国内是无法访问的。
    新版本的minikube已经在命令行中,充分考虑到了国内用户的网络情况,并提供了相应的命令行参数。不过网上大多博客的说明没有更新,在处理镜像拉取时,会让初学者浪费大量的时间处理网络问题。
    具体说明可以通过minikube start --help命令查看,节选如下:

    --image-mirror-country='': Country code of the image mirror to be used. Leave empty to use the global one. For
    Chinese mainland users, set it to cn.
    --image-repository='': Alternative image repository to pull docker images from. This can be used when you have
    limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use
    local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers
    

    上面的帮助说明中,已经把国内用户需要填什么都说清楚了,可以说很良心了。在国内不借助代理的情况下,minikube正确的打开方式应该是:
    Linux环境:

    minikube start --driver='docker' --image-mirror-country='cn' --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'
    #or bare metal
    sudo minikube start --driver='none' --image-mirror-country='cn' --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'
    

    Windows环境:

    minikube start --image-mirror-country="cn"
    
    转载请注明出处: cnblogs.com/wswind
  • 相关阅读:
    WinForm开发中几种找控件的方法
    C#读取Excel文件时提示:无法指出的错误
    数据库中取随机记录的方法
    C#写数据到Excel
    从数据库导出数据到word、excel、.txt
    Telerik RadTreeView查寻值的方法
    如何导出WinForm 控件界面的矢量图
    简单数据缓存类(c#)
    Windows Installer 清理实用工具说明
    硬盘安装Win7全攻略
  • 原文地址:https://www.cnblogs.com/wswind/p/14420803.html
Copyright © 2020-2023  润新知