首页 > 其他分享 >k8s安装网络组件calico报错Init:ImagePullBackOff

k8s安装网络组件calico报错Init:ImagePullBackOff

时间:2024-05-17 15:52:03浏览次数:17  
标签:node kube Running Init 报错 master k8s calico

问题:

安装网络组件calico报错Init:ImagePullBackOff

[root@k8s-master 15:33:08~/kubernets]# kubectl  get pods -n kube-system                      
NAME                                     READY   STATUS                  RESTARTS      AGE
calico-kube-controllers-cd8566cf-cqvxj   1/1     Running                 0             33m
calico-node-6f4np                        1/1     Running                 1 (11m ago)   33m
calico-node-bvvhc                        0/1     Init:ImagePullBackOff   0             5m37s


# [root@k8s-master 15:46:58~/kubernets]# kubectl describe po calico-node-986fm -n kube-system
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 5m11s default-scheduler Successfully assigned kube-system/calico-node-bvvhc to node03
Warning Failed 119s (x2 over 3m29s) kubelet Failed to pull image "calico/cni:v3.25.0": rpc error: code = Unknown desc = context canceled
Normal Pulling 92s (x3 over 5m11s) kubelet Pulling image "calico/cni:v3.25.0"
Warning Failed 14s (x3 over 3m29s) kubelet Error: ErrImagePull
Warning Failed 14s kubelet Failed to pull image "calico/cni:v3.25.0": rpc error: code = Unknown desc = unexpected EOF
Normal SandboxChanged 13s kubelet Pod sandbox changed, it will be killed and re-created.
Normal BackOff 1s (x5 over 3m28s) kubelet Back-off pulling image "calico/cni:v3.25.0"
Warning Failed 1s (x5 over 3m28s) kubelet Error: ImagePullBackOfff 

分析:

Pod事件列表中有“实例拉取镜像失败”事件,报错原因如下。这可能是镜像较大导致的情况。

解决:

# 到报错的机器node03上面手动下载镜像,可以参考其它成功机器的镜像
docker pull calico/cni:v3.25.0

# 然后删除Pod里面报错的容器
kubectl  get pods -n kube-system | grep calico-node-bvvhc   | awk '{print$1}'| xargs kubectl delete -n kube-system pods

查看是否正常,calico开头的容器都是READY

[root@k8s-master 15:44:05~/kubernets]# kubectl get pods -n kube-system
NAME                                     READY   STATUS    RESTARTS      AGE
calico-kube-controllers-cd8566cf-cqvxj   1/1     Running   0             45m
calico-node-44kgv                        1/1     Running   0             10m
calico-node-6f4np                        1/1     Running   1 (23m ago)   45m
calico-node-lv4sp                        1/1     Running   0             45m
calico-node-sw8r6                        1/1     Running   0             45m
coredns-6d8c4cb4d-77n7q                  1/1     Running   0             125m
coredns-6d8c4cb4d-bzm57                  1/1     Running   0             125m
etcd-k8s-master                          1/1     Running   1 (23m ago)   125m
kube-apiserver-k8s-master                1/1     Running   1 (23m ago)   125m
kube-controller-manager-k8s-master       1/1     Running   1 (23m ago)   125m
kube-proxy-4ft66                         1/1     Running   1 (23m ago)   125m
kube-proxy-4lmf2                         1/1     Running   0             78m
kube-proxy-thznw                         1/1     Running   0             77m
kube-proxy-xnlmm                         1/1     Running   1 (12m ago)   78m
kube-scheduler-k8s-master                1/1     Running   1 (23m ago)   125m  

查看node是否已经Ready状态

NAME         STATUS   ROLES                  AGE    VERSION
k8s-master   Ready    control-plane,master   127m   v1.23.6
node01       Ready    <none>                 79m    v1.23.6
node02       Ready    <none>                 79m    v1.23.6
node03       Ready    <none>                 80m    v1.23.6

补充一点

如果去机器上面也慢的话可以修改一下/etc/docker/daemon.json国内源

vim /etc/docker/daemon.json 

sudo systemctl daemon-reload
systemctl restart docker.service

  

 

  

标签:node,kube,Running,Init,报错,master,k8s,calico
From: https://www.cnblogs.com/lucktomato/p/18197930

相关文章

  • npm install 报错
    一问题npminstall报错 二解决看报错提示内容"thiscommandwith--forceor--legacy-peer-deps"命令改成这样:npminstall--force  三备注npmERR!codeERESOLVEnpmERR!ERESOLVEunabletoresolvedependencytreenpmERR!npmERR!Whileresolving:vue......
  • 记一次k8s etcd报错Unhealthy
    使用命令某个节点ectd不健康#kubectlgetcsNAMESTATUSMESSAGEERRORcontroller-managerHealthy......
  • initializer_list
    一:作用std::initializer_list是C++11引入的一个新特性,它允许你在函数参数中传递一个花括号{}初始化的列表。这个列表是临时的,并且主要用于初始化数组、容器或其他需要多个初始值的对象,函数实参数量未知且全部实参类型都是相同的。例子:#include<iostream>#include<ini......
  • C++ 初始化列表(Initialization List)
    请注意以下继承体系中各class的constructors写法:1classCPoint2{3public:4CPoint(floatx=0.0)5:_x(x){}67floatx(){return_x;}8voidx(floatxval){_x=xval;}9protected:10float_x;11};1213classCPoint2d:......
  • 日志报错监控,nodejs实现服务器日志监控,发现指定错误,发送到微信群
    nohupnodelog2.js>log_output.log2>&1&constfs=require('fs');constrequest=require('request');constschedule=require('node-schedule');constmoment=require("moment-timezone");constl......
  • python部署至k8s解决方案
    前言最近做了一个全文检索的项目,项目之前的架子是别人搭建的,部署方式是docker-compose,到后期这个同事基本上不参与了,后面发布测试的时候,我们觉得这种方式不适合测试环境和线上发版(当然也可能是我们不熟悉,有点不专业了),于是就在他开发的基础上,做了一些调整:修改Dockerfile:把依赖打......
  • 实战项目-基于K8s平台进行wordpress建站
    (240516更新)基本信息系统:Debian12.05k8s版本:1.30环境:虚拟机序号IP地址域名主机名1192.168.100.12k8s-master.$yourname.comk8s-master2192.168.100.15k8s-node1.yourname.comk8s-node13192.168.100.16k8s-node2.yourname.comk8s-node24192.168......
  • 记录一次定时器报错
    报错前因后果:我现在使用Winform开发上位机程序,读取PLC传递过来的CT,1、我将定时器方法InitTimerTick();写在构造器或者Load事件起作用2、如果写在后台线程不起作用,也不报错,我打断点查询的时候,发现InitCommonRegion方法没有执行,我向上查找,最终断点打在timer.Tick+=newEventHa......
  • 部署freeipa中报错:Command '/bin/systemctl start certmonger.service' returned non-
    cat/etc/dbus-1/system.d/certmonger.conf<allowsend_destination="org.fedorahosted.certmonger"send_interface="org.fedorahosted.certmonger"/><allowsend_destination="org.fedorahosted.certmonger"......
  • buffer/cach太高导致k8s无法新建pod分配内存
    1.使用hcache查看buff/cache占用情况执行下面的命令安装hcache,原hcache项目地址https://github.com/silenceshell/hcachewgethttps://silenceshell-1255345740.cos.ap-shanghai.myqcloud.com/hcachechmod+xhcachemvhcache/usr/local/bin/查看缓存排名前十的进程hc......