• network plugin is not ready: cni config uninitialized


    错误描述:

    "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"

    解决方案:

    下载flannel镜像(最新版本)

    [root@k8s-node1 ~]# docker pull jmgao1983/flannel
    
    [root@k8s-master~]# mkdir -p /etc/cni/net.d/
    [root@k8s-master~]# cat <<EOF> /etc/cni/net.d/10-flannel.conf
    > {"name":"cbr0","type":"flannel","delegate": {"isDefaultGateway": true}}
    > EOF
    [root@k8s-master~]# mkdir /usr/share/oci-umount/oci-umount.d -p
    [root@k8s-master~]# mkdir /run/flannel/
    mkdir: 无法创建目录"/run/flannel/": 文件已存在
    [root@k8s-master~]# cat <<EOF> /run/flannel/subnet.env
    > FLANNEL_NETWORK=192.168.0.0/16
    > FLANNEL_SUBNET=192.168.1.0/24
    > FLANNEL_MTU=1450
    > FLANNEL_IPMASQ=true
    > EOF
    [root@k8s-master~]# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
    Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
    podsecuritypolicy.policy/psp.flannel.unprivileged configured
    clusterrole.rbac.authorization.k8s.io/flannel unchanged
    clusterrolebinding.rbac.authorization.k8s.io/flannel unchanged
    serviceaccount/flannel unchanged
    configmap/kube-flannel-cfg unchanged
    daemonset.apps/kube-flannel-ds unchanged
    [root@k8s-master~]# systemctl restart kubelet
    
    [root@k8s-master ~]# kubectl get nodes
    NAME STATUS ROLES AGE VERSION
    k8s-master Ready control-plane,master 3h54m v1.23.5
    k8s-node1 Ready <none> 3h46m v1.23.5
    

      

    问题解决~

  • 相关阅读:
    Axure 8 注册码,市面上很多注册码都不行用,但是这个可以。
    SmartGit Mac、Liunx、Windows过期后破解方法
    iOS蓝牙4.0开发例子
    苹果发布【新开发语言】Swift
    iOS Web开发
    [置顶]JB开发之制作系统级Application
    mac 10.9 dock在多屏幕间移动
    IOS Application Security Testing Cheat Sheet
    看上去很美 国内CDN现状与美国对比
    iOS 企业证书发布app 流程
  • 原文地址:https://www.cnblogs.com/autumn/p/16116459.html
Copyright © 2020-2023  润新知