首页 > 其他分享 >安装metrics-server遇到Readiness probe failed HTTP probe failed with statuscode 500报错

安装metrics-server遇到Readiness probe failed HTTP probe failed with statuscode 500报错

时间:2024-08-22 13:38:48浏览次数:9  
标签:-- probe system server metrics failed 报错 kube calico

安装metrics-server后显示Running,但是READY状态一直为0/1,通过describe查询到如下内容

Readiness probe failed: HTTP probe failed with statuscode: 500

1.报错内容

root@master:~/metrics-server# kubectl get pods -n kube-system metrics-server-dd7677d75-grfcq
NAME                             READY   STATUS    RESTARTS   AGE
metrics-server-dd7677d75-grfcq   0/1     Running   0          11m
root@master:~/metrics-server# kubectl describe pods -n kube-system metrics-server-dd7677d75-grfcq
Name:                 metrics-server-dd7677d75-grfcq
Namespace:            kube-system
Priority:             2000000000
Priority Class Name:  system-cluster-critical
Service Account:      metrics-server
Node:                 node01.sec.lab/10.22.4.12
Start Time:           Thu, 22 Aug 2024 11:47:55 +0800
Labels:               k8s-app=metrics-server
                      pod-template-hash=dd7677d75
Annotations:          cni.projectcalico.org/containerID: 5b9994d73afeeb910ca8c6208d835f45699d7c4c5216d703d8ffe1063df1ae1e
                      cni.projectcalico.org/podIP: 10.244.182.3/32
                      cni.projectcalico.org/podIPs: 10.244.182.3/32
Status:               Running
IP:                   10.244.182.3
IPs:
  IP:           10.244.182.3
Controlled By:  ReplicaSet/metrics-server-dd7677d75
Containers:
  metrics-server:
    Container ID:    containerd://c5e44c1653320d08a1109e8cc1afd18617c649069420949e69cfc01226463ee7
    Image:           m.daocloud.io/registry.k8s.io/metrics-server/metrics-server:v0.7.1
    Image ID:        m.daocloud.io/registry.k8s.io/metrics-server/metrics-server@sha256:db3800085a0957083930c3932b17580eec652cfb6156a05c0f79c7543e80d17a
    Port:            10250/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    Args:
      --cert-dir=/tmp
      --secure-port=10250
      --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
      --kubelet-use-node-status-port
      --metric-resolution=15s
    State:          Running
      Started:      Thu, 22 Aug 2024 11:47:56 +0800
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:        100m
      memory:     200Mi
    Liveness:     http-get https://:https/livez delay=0s timeout=1s period=10s #success=1 #failure=3
    Readiness:    http-get https://:https/readyz delay=20s timeout=1s period=10s #success=1 #failure=3
    Environment:  <none>
    Mounts:
      /tmp from tmp-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ct8r8 (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   True
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  tmp-dir:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
  kube-api-access-ct8r8:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age                 From               Message
  ----     ------     ----                ----               -------
  Normal   Scheduled  11m                 default-scheduler  Successfully assigned kube-system/metrics-server-dd7677d75-grfcq to node01.sec.lab
  Normal   Pulled     11m                 kubelet            Container image "m.daocloud.io/registry.k8s.io/metrics-server/metrics-server:v0.7.1" already present on machine
  Normal   Created    11m                 kubelet            Created container metrics-server
  Normal   Started    11m                 kubelet            Started container metrics-server
  Warning  Unhealthy  79s (x66 over 10m)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 500
root@master:~/metrics-server#

2.处理方式(二选一)

2.1.直接kubectl修改

# 在containers args内增加- --kubelet-insecure-tls内容
$ kubectl edit deployments.apps -n kube-system metrics-server
# 修改后的args
      containers:
      - args:
        - --cert-dir=/tmp
        - --secure-port=10250
        - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
        - --kubelet-use-node-status-port
        - --metric-resolution=15s
        - --kubelet-insecure-tls

2.2.YAML文件修改

# 在components.yaml文件内增加- --kubelet-insecure-tls内容
root@master:~/metrics-server# head -140 components.yaml | tail -10
        k8s-app: metrics-server
    spec:
      containers:
      - args:
        - --cert-dir=/tmp
        - --secure-port=10250
        - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
        - --kubelet-use-node-status-port
        - --metric-resolution=15s
        - --kubelet-insecure-tls
root@master:~/metrics-server#

3.运行状态

$ kubectl get pods -n kube-system metrics-server-869c9dc79d-9rvnh

NAME                              READY   STATUS    RESTARTS   AGE
metrics-server-869c9dc79d-9rvnh   1/1     Running   0          90m
$ kubectl top pod -A
NAMESPACE          NAME                                       CPU(cores)   MEMORY(bytes)
calico-apiserver   calico-apiserver-7b4f8c9f47-j98nx          9m           38Mi
calico-apiserver   calico-apiserver-7b4f8c9f47-vll2x          3m           30Mi
calico-system      calico-kube-controllers-7bcb74cbc6-kzc7f   7m           12Mi
calico-system      calico-node-dhhnc                          35m          123Mi
calico-system      calico-node-jtwth                          39m          123Mi
calico-system      calico-node-m64bg                          36m          124Mi
calico-system      calico-typha-86444685d4-42rs6              4m           17Mi
calico-system      calico-typha-86444685d4-mrwz5              3m           17Mi
calico-system      csi-node-driver-66wrl                      1m           7Mi
calico-system      csi-node-driver-kpf8z                      1m           7Mi
calico-system      csi-node-driver-nxlw9                      1m           8Mi
kube-system        coredns-857d9ff4c9-4tt76                   4m           12Mi
kube-system        coredns-857d9ff4c9-zh576                   3m           12Mi
kube-system        etcd-master.sec.lab                        46m          97Mi
kube-system        kube-apiserver-master.sec.lab              112m         369Mi
kube-system        kube-controller-manager-master.sec.lab     30m          50Mi
kube-system        kube-proxy-89bk2                           18m          20Mi
kube-system        kube-proxy-bjlmp                           19m          20Mi
kube-system        kube-proxy-mk257                           1m           20Mi
kube-system        kube-scheduler-master.sec.lab              8m           18Mi
kube-system        metrics-server-869c9dc79d-9rvnh            7m           18Mi

标签:--,probe,system,server,metrics,failed,报错,kube,calico
From: https://www.cnblogs.com/amsilence/p/18373660

相关文章

  • 安装MySQL报错ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3
    今天要在本地装个mysql,发现mysql-5.7.19-winx64版总是报错由于找不到MSVCP120.dll,无法继续执行代码。重新安装程序可能会解决此问题。,去微软官网找到了最新的VisualC++RedistributableforVisualStudio,下载后发现还是不停地报错。怀疑是系统不兼容,没办法只好安装mysql-8.0.37......
  • 报错汇总
    报错汇总环境:联想拯救者R70002021ubuntu24.04LST1编译Linux内核出现:usr/bin/ld:scripts/dtc/dtc-parser.tab.o:(.bss+0x50):multipledefinitionof`yylloc‘;出现的原因gcc版本高解决方案修改scripts/dtc目录下的dtc-lexer.lex.c_shipped文件中找到YYLTYPEyyloc这......
  • 海光 FTPM 运行报错:Fapi_Provision_Finish() ErrorCode (0x00060025) No EK certifica
    使用的是海光CPU提供的基于固件的FTPM,错误原因是海光没有给TPM提供相应的EK证书。从而导致Fapi_Provision()接口无法通过证书的校验。关于Fapi_Provision()接口的功能,官网提到是:RetrievetheEKtemplate,nonceandcertificate,verifythattheymatchtheTPM’sEK......
  • java 读取pdf写成流报错PDF contains an encryption dictionary, please remove it wi
    java读取pdf写成流报错PDFcontainsanencryptiondictionary,pleaseremoveitwithsetAllSecurityToBeRemoved()orsetaprotectionpolicywithprotect()如何解决,如果需要引入依赖,需要哪些依赖 问题原因是PDF文件被加密了,需要使用PDFBox的相关方法来处理加密。 解......
  • 本文档汇总了一些ThinkPad在开机时会出现的报错信息。
    故障现象ThinkPad在开机时常见的报错信息及含义。0177BadSVPdata,stopPOSTtask—ThechecksumofthesupervisorpasswordintheEEPROMisnotcorrect。Systemboard。主板问题。0183BadCRCofSecuritySettingsinEFIVariable。EntertheThinkPadSetuppro......
  • sign_and_send_pubkey: signing failed: agent refused operation
    报错描述ssh连接远程主机时,出现sign_and_send_pubkey:signingfailed:agentrefusedoperation错误,并且还是需要输入密码实验环境Master[root@kvm-master~]#ssh-copy-id-i.ssh/id_rsa.pubroot@kvm-slave/usr/bin/ssh-copy-id:INFO:Sourceofkey(s)tobeinstal......
  • Docker无法运行java虚拟机报错There is insufficient memory for the Java Runtime
    镜像导入到docker后无法启动容器的问题,但是上传到别的服务器上面又可以正常启动容器,报错信息如下:#ThereisinsufficientmemoryfortheJavaRuntimeEnvironmenttocontinue.#CannotcreateGCthread.Outofsystemresources.#Cannotsavelogfile,dumptoscree......
  • 解决Cannot find module ‘@/score/test/index.vue‘ or its corresponding type decl
    {"compilerOptions":{"target":"esnext","module":"esnext","strict":true,"jsx":"preserve","importHelpers":true,"moduleResolu......
  • Postman中Body添加注释后请求报错问题解决【保姆级教程!!!】
    本文介绍关于Postman中Body添加注释后请求报错问题解决方法如:请求返回下述报错操作失败!系统异常,JsonParseException:Unexpectedcharacter(‘/’(code47)):maybea(non-standard)comment?(notrecognizedasonesinceFeature‘ALLOW_COMMENTS’notenabled......
  • 黑神话悟空dx12报错怎么解决?dx12错误的处理方法
    随着《黑神话悟空》这款备受瞩目的国产游戏的发布,不少玩家在体验过程中遇到了DX12报错的问题,这不仅影响了游戏体验,还可能让一些精彩的游戏内容无法正常展现。为了帮助广大玩家顺利解决这一难题,以下是一些经过验证的有效解决办法,请根据您的具体情况尝试。解决方法一:帧数大师优......