zoukankan      html  css  js  c++  java
  • kubelet failed to get container info for "/system.slice/docker.service": unknown container "/system.slice/docker.service"错误

    kubernetes版本1.18.6

    描述:在查看kubelet状态或是在查看日志时有以下错误

    Jun 28 14:05:08 cwztapp131 kubelet[775]: E0628 14:05:08.185793     775 summary_sys_containers.go:47] Failed to get system container stats for "/system.slice/docker.service": failed to get cgroup stats for "/system.slice/docker.service": failed to get container info for "/system.slice/docker.service": unknown container "/system.slice/docker.service"

    原因:kubernetes和docker版本兼容性问题

    解决方法:修改kubelet配置文件
    vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
    找到 KUBELET_CGROUP_ARGS=–cgroup-driver=systemd 在后面增加以下内容:
    –runtime-cgroups=/systemd/system.slice –kubelet-cgroups=/systemd/system.slice

    Environment="KUBELET_CGROUP_ARGS=--runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice"
    ExecStart=/usr/local/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_CGROUP_ARGS $KUBELET_EXTRA_ARGS
    

    保存之后,重启kubelet服务即可 

    systemctl daemon-reload
    systemctl restart kubelet
    

    参考:https://blog.csdn.net/vicsun2007/article/details/82289211

  • 相关阅读:
    java ssh免密登录
    [8.0][MGR][bug]多主模式,外键冲突错误
    内核月报bookmark
    netcat 传输T级别大文件
    innodb部分内部操作
    qps.sh
    ABAP-ALV判断骚操作
    HCM基本知识
    SAP-VOFM的使用
    ABAP-处理去掉特殊字符
  • 原文地址:https://www.cnblogs.com/zhangmingcheng/p/15034096.html
Copyright © 2011-2022 走看看