How to get the resource usage of a pod in Kubernetes?

前端 未结 1 1355
误落风尘
误落风尘 2021-01-05 05:05

How can we get the real resource usage (not resource requests) of each pod on Kubernetes by command line? Heapster is deprecated. Meanwhile, Metrics-server still does not su

相关标签:
1条回答
  • 2021-01-05 05:16

    Error from server (ServiceUnavailable): the server is currently unable to handle the request (get services http:heapster:)

    It sounds like the heapster deployment just forgot to install the Service for heapster; I would expect this would get you past that error, but unknown whether it would actually cause kubectl top pods to start to work:

    kubectl create -f /dev/stdin <<SVC
    apiVersion: v1
    kind: Service
    metadata:
      name: heapster
      namespace: kube-system
    spec:
      selector:
        whatever-label: is-on-heapster-pods
      ports:
      - name: http
        port: 80
        targetPort: whatever-is-heapster-is-listening-on
    SVC
    
    0 讨论(0)
提交回复
热议问题