• 搭建k8s节点报错[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]:


    [root@k8snode2 k8s_images]# kubeadm join --token f0bc0b.7aa9033c4f7ae16c 192.168.6.7:6443 --discovery-token-ca-cert-hash sha256:ee4c3346ade1c7ce0eeb80a9cce46b7d323886012e3dd15ac49f2ba81a3f0023
    [preflight] Running pre-flight checks.
        [WARNING FileExisting-crictl]: crictl not found in system path
    [preflight] Some fatal errors occurred:
        [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
        [ERROR Swap]: running with swap on is not supported. Please disable swap
    [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
     

    处理方法:

    [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1

    [root@k8snode1 k8s_images]# echo "1" >/proc/sys/net/bridge/bridge-nf-call-iptables
     

       [ERROR Swap]: running with swap on is not supported. Please disable swap
    [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

    [root@k8snode2 k8s_images]# swapoff -a
    [root@k8snode2 k8s_images]# vim /etc/fstab
    #/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
    [root@k8smaster k8s_images]# free -m
                  total        used        free      shared  buff/cache   available
    Mem:            992         524          74           7         392         284
    Swap:             0           0           0
     

    最后处理结果

    [root@k8snode1 k8s_images]# kubeadm join --token f0bc0b.7aa9033c4f7ae16c 192.168.6.7:6443 --discovery-token-ca-cert-hash sha256:ee4c3346ade1c7ce0eeb80a9cce46b7d323886012e3dd15ac49f2ba81a3f0023
    [preflight] Running pre-flight checks.
        [WARNING FileExisting-crictl]: crictl not found in system path
    [discovery] Trying to connect to API Server "192.168.6.7:6443"
    [discovery] Created cluster-info discovery client, requesting info from "https://192.168.6.7:6443"
    [discovery] Requesting info from "https://192.168.6.7:6443" again to validate TLS against the pinned public key
    [discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server "192.168.6.7:6443"
    [discovery] Successfully established connection with API Server "192.168.6.7:6443"

    This node has joined the cluster:
    * Certificate signing request was sent to master and a response
      was received.
    * The Kubelet was informed of the new secure connection details.

    Run 'kubectl get nodes' on the master to see this node join the cluster.
    ————————————————
    原文链接:https://blog.csdn.net/zhydream77/article/details/81909939

  • 相关阅读:
    vue input输入框验证10的n次方
    Django2.2使用mysql数据库pymysql版本不匹配问题的解决过程与总结
    数据结构(四):树
    数据结构(三):队列
    数据结构(二):栈
    数据结构(一):链表
    python深拷贝与浅拷贝
    python yield、yield from与协程
    python __getattribute__、__getattr__、__setattr__详解
    python迭代、可迭代对象、迭代器及生成器
  • 原文地址:https://www.cnblogs.com/yds941268778/p/12849776.html
Copyright © 2020-2023  润新知