kubeadm init默认用的是k8s.gcr.io这个仓库,由于国内被屏蔽了

搜了很多文章都是用脚本去解决,这个太繁琐了。

最后kubeadm init --help看了一下,发现其实可以指定image的仓库。

Flags:

--apiserver-advertise-address string The IP address the API Server will advertise it's listening on. If not set the default network interface will be used.

--apiserver-bind-port int32 Port for the API Server to bind to. (default 6443)

--apiserver-cert-extra-sans strings Optional extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names.

--cert-dir string The path where to save and store the certificates. (default "/etc/kubernetes/pki")

--certificate-key string Key used to encrypt the control-plane certificates in the kubeadm-certs Secret.

--config string Path to a kubeadm configuration file.

--control-plane-endpoint string Specify a stable IP address or DNS name for the control plane.

--cri-socket string Path to the CRI socket to connect. If empty kubeadm will try to auto-detect this value; use this option only if you have more than one CRI installed or if you have non-standard CRI socket.

--dry-run Don't apply any changes; just output what would be done.

-k, --experimental-kustomize string The path where kustomize patches for static pod manifests are stored.

--feature-gates string A set of key=value pairs that describe feature gates for various features. Options are:

IPv6DualStack=true|false (ALPHA - default=false)

-h, --help help for init

--ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.

--image-repository string Choose a container registry to pull control plane images from (default "k8s.gcr.io")

--kubernetes-version string Choose a specific Kubernetes version for the control plane. (default "stable-1")

--node-name string Specify the node name.

--pod-network-cidr string Specify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node.

--service-cidr string Use alternative range of IP address for service VIPs. (default "10.96.0.0/12")

--service-dns-domain string Use alternative domain for services, e.g. "myorg.internal". (default "cluster.local")

--skip-certificate-key-print Don't print the key used to encrypt the control-plane certificates.

--skip-phases strings List of phases to be skipped

--skip-token-print Skip printing of the default bootstrap token generated by 'kubeadm init'.

--token string The token to use for establishing bidirectional trust between nodes and control-plane nodes. The format is [a-z0-9]{6}\.[a-z0-9]{16} - e.g. abcdef.0123456789abcdef

--token-ttl duration The duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire (default 24h0m0s)

--upload-certs Upload control-plane certificates to the kubeadm-certs Secret.

只要执行的时候加上参数就可以了。

kubeadm init --image-repository="imdingtalk" --v=8

k8s 拉取镜像失败_kubernetes k8s.gcr.io拉取镜像失败问题相关推荐

  1. k8s 拉取镜像失败_Kubernetes:如何解决从k8s.gcr.io拉取镜像失败问题

    安装k8s的时候需要从k8s.gcr.io拉取镜像 执行kubeadm init     --pod-network-cidr=10.244.0.0/16   --apiserver-advertis ...

  2. Kubernetes:如何解决从k8s.gcr.io拉取镜像失败问题

    安装k8s的时候需要从k8s.gcr.io拉取镜像 kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-addres ...

  3. 1条命令解决使用kubeadm安装 kubernetes 从 k8s.gcr.io 拉取镜像失败的问题

    原因 由于 kubernetes 安装时需要从 k8s.gcr.io 拉取镜像,但是该网站被我国屏蔽了,国内没法正常访问导致没法正常进行kubernetes正常安装. 这里通过介绍从Docker官方默 ...

  4. 如何使用Aliyun容器镜像服务对海外gcr、quay仓库镜像进行镜像拉取构建?

    关注「WeiyiGeek」公众号 设为「特别关注」每天带你玩转网络安全运维.应用开发.物联网IOT学习! 本章目录: 0x00 前言简述 0x01 操作实践 原文地址: 如何使用Aliyun容器镜像服 ...

  5. 下载k8s.gcr.io仓库的镜像的两个方式

    在一些k8s环境,服务器没有直接访问k8s.gcr.io.gcr.io仓库的权限,这就需要docker命令能使用代理. 方式1: Docker代理 如果你已经在本地windows上使用能上google ...

  6. 【问题解决】This container is having trouble accessing https://k8s.gcr.io | 如何解决从k8s.gcr.io拉取镜像失败问题?

    docker.io仓库对google的容器做了镜像,可以通过下列命令下拉取相关镜像: docker pull mirrorgooglecontainers/kube-apiserver-amd64:v ...

  7. 解决从k8s.gcr.io拉取镜像失败问题

    1.解决方案 docker.io仓库对google的容器做了镜像,可以通过下列命令下拉取相关镜像: docker pull mirrorgooglecontainers/kube-apiserver- ...

  8. 从k8s.gcr.io拉取镜像

    此方案需有科学上网环境 打开并登陆谷歌云控制台:https://console.cloud.google.com/ 点击激活Cloud Shell 点击后即可进入Cloud Shell终端 在终端内执 ...

  9. k8s.gcr.io、gcr.io仓库的镜像下载

    镜像下载.域名解析.时间同步请点击 阿里巴巴开源镜像站 获取这类镜像的方法一般有2种: 1.通过拉取国内镜像仓库的内容(操作简单直接拉取即可,缺点是镜像的版本更新可能较慢,可能无法获取最新的镜像) 2 ...

最新文章

  1. (转)全文检索技术学习(一)——Lucene的介绍
  2. 2017年前端工作小结,个人踩坑之旅,前端学习者的杂谈
  3. 【c++算法】变动性算法
  4. 【JVM调优工具篇】使用JProfiler追踪GC Roots溯源
  5. 技术资料,老吴的博客 很好的 技术博客 里面有很多资料 书籍或者软件安装包...
  6. jdbc mysql demo_JDBC_demo:java连接mysql过程
  7. postmapping注解参数说明_从零搭建后端框架:优雅的参数校验Validator
  8. tablednd保存 php,JQuery-tableDnD 拖拽的基本使用介绍
  9. python select网络编程详细介绍
  10. 【FXCG】如何成功启动SWOT分析法
  11. 德保罗大学计算机科学专业,德保罗大学专业
  12. 双歧杆菌基因组序列批量下载、基因组注释、antiSMASH合成基因簇挖掘、核心基因的同源性比较。
  13. 再迎顶尖科学家,百度研究院为何如此吸引大师级AI人才?
  14. Mysql-binlog日志分析
  15. 大一新生计算机强化训练小结,大一新生军训个人小结
  16. 插秧诗 - 退步原来是向前
  17. 【歪门邪道】Android页面上快速实现蒙层引导需求
  18. 前端工程化----Node.js基础篇
  19. 婴儿过敏性鼻炎是怎么产生的?
  20. MySQL三部曲之初见端倪

热门文章

  1. 医疗是什么?AI医疗概念解析AI
  2. VC:CString.Format()函数详解
  3. 技术融合:使用区块链的5G——未来无线通信的序章
  4. 腾讯全民wifi如何?
  5. 阿里IOT云飞燕平台的使用和感悟。
  6. 栅格图数字化(矢量化)
  7. 【优化求解】基于收敛因子和黄金正弦指引机制的蝴蝶优化算法求解单目标优化问题matlab代码(AGSABOA)
  8. 设置Laber上传时注意字体大小要统一,不然不生效
  9. Leet Code题(2)——整数反转
  10. Mac电脑使用Charles抓取Android手机app的包