【Grafana问题解决】lost connection to pod & lf you‘re secimg thisGrasfana has failed to load its applicati

lost connection to pod

最近在使用kube-promethues搭建K8s集群监控启动所有pods后,执行如下命令kubectl --address 0.0.0.0 --namespace monitoring port-forward svc/grafana 3000

出现如下问题:
E0303 22:37:30.698827 625081 portforward.go:400] an error occurred forwarding 3000 -> 3000:Connection refused lost connection to pod

之后尝试写脚本,问题依然无法解决

while true
do
    nohup kubectl --address 0.0.0.0 --namespace monitoring port-forward svc/grafana 3000 >/dev/null 2>&1 &
done

最终解决思路:
修改grafana-deployment.yaml文件,类型改成NodePort

ports:
- name: http
  port: 3000
  nodePort: 32000
  targetPort: http
type: NodePort

(PS:笔者晚上人少的时候连接,都没断过。猜测大概率是网络原因)







lf you’re secimg thisGrasfana has failed to load its applicati

在这里插入图片描述
在网上搜索,个人都有个人的说话。但是经过笔者各方面排查,发现是修改grafana编译后的代码后,代码里面有错误导致的bug,所以出现此页面很可能是代码出现了bug。注意修正后记得清理浏览器缓存

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值