【k8s】Error from server (ServiceUnavailable): the server is currently unable to handle the request

这篇具有很好参考价值的文章主要介绍了【k8s】Error from server (ServiceUnavailable): the server is currently unable to handle the request。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

安装metrics-server后,pod启动时成功的就是一直报这个错。网上找了很多放法,不管用,可以试试。

【k8s】Error from server (ServiceUnavailable): the server is currently unable to handle the request

 解决方法:新增hostNetwork: true到metries-server.yaml:

参考地址:kubernetes - Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io) - Stack Overflow文章来源地址https://www.toymoban.com/news/detail-502027.html

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: metrics-server
  name: metrics-server
  namespace: kube-system
spec:
  selector:
    matchLabels:
      k8s-app: metrics-server
  strategy:
    rollingUpdate:
      maxUnavailable: 0
  template:
    metadata:
      labels:
        k8s-app: metrics-server
    spec:
      hostNetwork: true ## 新增

到了这里,关于【k8s】Error from server (ServiceUnavailable): the server is currently unable to handle the request的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • K8S异常之Unable to connect to the server: x509: certificate has expired or is not yet valid

    2.1 处理步骤 2.2 处理步骤详细情况 如上,发现很多证书都是 invalid 的状态,接着更新证书: 如下,更新证书后,证书过期时间已经更新为 365d 3.1 再次查看kubectl get node,发现有新的错误: error: You must be logged in to the server (Unauthorized) 3.2 上述错误解决方案 备份配置文件 cp -rp

    2024年02月03日
    浏览(34)
  • k8s遇 The connection to the server :6443 was refused

    一般而言,6443端口是用于给apiserver使用的,如果报这个错误,就说明apiserver要么没起来,要么就是端口被占用了。 挨个检查以下几个守护进程有无问题,如果有报错日志,则需要进行排查 如果都没有问题,那就查看apiserver容器是否起来了 如果apisever没有正常运行中,就需要

    2024年01月19日
    浏览(42)
  • K8s ❉ The connection to the server 报错localhost:8080 was refused

    现象描述 K8s集群初始化成功后,kubectl get nodes 查看节点信息时报错: 报错信息: 解决办法: 执行以下命令

    2024年02月11日
    浏览(117)
  • K8s 重设解决 “The connection to the server xxx:6443 was refused” 问题

    有时 kubectl 执行命令时出现问题,无法连接 kube-apiserver,报错如下: 初步判断,kubelet 没有将 apiserver 拉起来。 上面报错说明 kubelet 没有正常启动。 日志如下: 注意,在生产环境谨慎执行,在测试环境可以考虑使用。注意,在 master 节点上操作。 这部分详细的可以参考 K8s

    2024年02月04日
    浏览(39)
  • 记【k8s】:访问 Prometheus UI界面:Warning: Error fetching server time

    💖The Begin💖点点关注,收藏不迷路💖 Warning: Error fetching server time: Detected 86338.77700018883 seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results. 这个警告表明您的浏览器和服务器之间存在大约 86338.777 秒的时间差异,这

    2024年04月17日
    浏览(54)
  • K8S--安装metrics-server,解决error: Metrics API not available问题

    原文网址:K8S--安装metrics-server,解决error: Metrics API not available问题-CSDN博客 本文介绍K8S通过安装metrics-server来解决error: Metrics API not available问题的方法。 Metrics Server采用了Kubernetes Metrics API的标准,它使用HTTP接口来暴露度量指标数据,通过轮询来收集这些数据,然后将其存储在

    2024年02月22日
    浏览(35)
  • k8s初始化报错:[ERROR CRI]: container runtime is not running(已解决)

    如有错误,敬请谅解! 此文章仅为本人学习笔记,仅供参考,如有冒犯,请联系作者删除!!          在网上找了好几天解决方案,大部分都是下述方案:         但是当我们尝试之后仍无法解决问题。 如有错误,请联系作者删除 并恳请同行朋友予以斧正,万分感谢!

    2024年02月07日
    浏览(38)
  • k8s kubectl 启动成功,但执行命令时报错:The connection to the server localhost:8080 was refused - did you specify

    node2 systemctl start kubectl 后可以正常启动服务,systemctl ststus kubectl 也显示running。但是执行 kubectl cluster-info 或  kubectl get pod 均报错:The connection to the server localhost:8080 was refused - did you specify the right host or port 怀疑是重启服务之前 ~/.kube/config 被测试进行修改后导致报错 首先查看

    2024年03月12日
    浏览(53)
  • k8s--重启后报错:The connection to the server lb.kubesphere.local:6443 was refused - did you specify the r

    执行这个命令报错:The connection to the server lb.kubesphere.local:6443 was refused - did you specify the r kubectl get pod -A 如果你之前是正常运行的话,只用等待就行了,因为这个错是k8s主节点的kubectl还没启动的原因,所以会报这个错!! 一般等个2分钟左右在执行命令:

    2024年02月11日
    浏览(34)
  • 记一次k8s报错:The connection to the server ip:6443 was refused - did you specify the right host or port?

    敲击kubectl任意命令提示无法连接到10.75.78.212 的6443端口 kube-apiserver 默认端口无法连接,初步判断 kube-apiserver 服务出现问题 这里简单总结下kube-apiserver组件: kube-apiserver 是 Kubernetes 控制平面的枢纽,负责处理所有的 API 调用,包括集群管理、应用部署和维护、用户交互等,并

    2024年04月10日
    浏览(152)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包