安装metrics-server后,pod启动时成功的就是一直报这个错。网上找了很多放法,不管用,可以试试。
解决方法:新增hostNetwork: true
到metries-server.yaml:文章来源:https://www.toymoban.com/news/detail-502027.html
参考地址: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模板网!