zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    平方分割poj2104K-th Number
    平方分割poj2104K-th Number
    GIT学习之路第五天 分支管理
    GIT学习之路第五天 分支管理
    daily_journal_2 神奇的一天
    daily_journal_2 神奇的一天
    51nod1264 线段相交
    51nod1264 线段相交
    51nod1265判断四点共面
    51nod1265判断四点共面
  • 原文地址:https://www.cnblogs.com/wswind/p/14420803.html
Copyright © 2011-2022 走看看