zoukankan      html  css  js  c++  java
  • k8s + flannel 内网不能互通问题排查

    k8s dashboard 报错 Error: 'dial tcp 172.168.56.2:9090: getsockopt: connection refused'

    访问web (http://192.168.56.101:8080/ui)
    Error: 'dial tcp 172.17.26.2:9090: getsockopt: connection refused' 
     
     

    排查方法:

    1、需要检查apiserver的地址设置的是否正确(重启apiserver和kubenets),然后就是flannel是否配置启动

    2、配置Kubernetes网络,在master和nodes上都需要安装flannel 检查master和node上配置文件是否一致。

    复制代码
    vi /etc/sysconfig/flanneld
    # Flanneld configuration options
    # etcd url location. Point this to the server where etcd runs
    FLANNEL_ETCD_ENDPOINTS="http://192.168.56.101:2379"
    # etcd config key. This is the configuration key that flannel queries
    # For address range assignment
    FLANNEL_ETCD_PREFIX="/atomic.io/network"
    # Any additional options that you want to pass
    #FLANNEL_OPTIONS=""

    3、检查iptables -L -n ,检查node节点上的FORWARD 查看转发是否是drop,如果是drop,则开启

    iptables -P FORWARD ACCEPT 

    以上命令系统重启后就失效了

    或者

     echo "net.ipv4.ip_forward = 1" >>/usr/lib/sysctl.d/50-default.conf
     cat /usr/lib/sysctl.d/50-default.conf | grep forward

    然后在master节点上访问 curl -i  http://172.17.26.2:9090 可以访问。

  • 相关阅读:
    js交互数据
    js字符串操作
    js数组操作
    hasattr ,setarrt, getattr属性
    装饰器
    redis数据库安装
    ubuntu中mysql数据库安装与删除
    装换器
    jinjia2
    Laravel框架与ThinkPHP框架的不同
  • 原文地址:https://www.cnblogs.com/mybxy/p/10490435.html
Copyright © 2011-2022 走看看