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 可以访问。
--------------------- 
作者:qa1986nibuhao 
来源:CSDN 
原文:https://blog.csdn.net/qa1986nibuhao/article/details/80814870 
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值