一个伪linux粉丝的blog

  1. 首页
  2. unix/linux
  3. 正文

promethous warn InstanceDown

14 5 月, 2021 777点热度 0人点赞 0条评论

简介

一个新节点,添加Prometheus 监控后,提示InstanceDown的简单处理。

 

现象截图

有类似 InstanceDown 状态 Firing 等字样

日志

查看 kubelet 日志,日志里面有类似401 和  Unauthorized 等字样

Apr 09 00:03:00 dev-node-05 kubelet[31047]: created by net/http.(*Server).Serve
Apr 09 00:03:00 dev-node-05 kubelet[31047]: /usr/local/go/src/net/http/server.go:2720 +0x288
Apr 09 00:03:00 dev-node-05 kubelet[31047]: logging error output: "Unauthorized"
Apr 09 00:03:00 dev-node-05 kubelet[31047]: [[Prometheus/2.9.2] 10.30.2.172:53350]
Apr 09 00:03:03 dev-node-05 kubelet[31047]: I0409 00:03:03.279560 31047 kubelet_node_status.go:464] Using node IP: "10.30.2.183"
Apr 09 00:03:10 dev-node-05 kubelet[31047]: I0409 00:03:10.291264 31047 server.go:796] GET /metrics/cadvisor: (50.047μs) 401

解决方法

来源文档

https://github.com/prometheus-operator/prometheus-operator/issues/976
需要修改kubelet配置参数,增加2个字段
--authentication-token-webhook=true
--authorization-mode=Webhook

实际操作

找到 kubelet 配置文件位置

systemctl status kubelet

cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

在

[Service]
Environment="**** 追加上面的2个字段  --authentication-token-webhook=true --authorization-mode=Webhook "
重启kubelet即可。

 

效果

界面上,节点状态已经是 up了,问题解决。

相关文章:

  1. 普通usb ZC0301 WebCam成功设置为Web Cam Server
  2. 做了一次LinuxDeepin分流工作
  3. vmware-centos-lvextend-disk
  4. ssh-auto-accept-pub-key-firstime
标签: 暂无
最后更新:19 12 月, 2021

wanjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

This site uses Akismet to reduce spam. Learn how your comment data is processed.

归档
分类
  • network / 332篇
  • Uncategorized / 116篇
  • unix/linux / 122篇
  • 业界资讯 / 38篇
  • 公司杂事 / 11篇
  • 数码影像 / 12篇
  • 美剧 / 3篇
  • 美图共赏 / 21篇
  • 英语学习 / 3篇
标签聚合
iMac 泰国 docker k8s unveiled today Nginx 网通 kernel nexus deepseek d90 邮件归档 dreamhost空间 ldap postgres Ubuntu 网站运营 dreamhost 天翼live brew webhook gitlab 职责 刷机 Google Google Voice 虚拟主机 VPS Linux squid

COPYRIGHT © 2008-2025 wanjie.info. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang