heapster资源API

heapster资源

 获取cluster支持的metrics
 curl  heapster/api/v1/model/metrics

 列出Nodes支持的metrics
 curl heapster/api/v1/model/nodes

 查看对应Pod的资源metrics
 curl heapster/api/v1/model/namespaces/default/pods/zk-1/metrics

集群资源

curl  heapster/api/v1/model/metrics
[
  "cpu/usage_rate",
  "memory/usage",
  "cpu/request",
  "cpu/limit",
  "memory/request",
  "memory/limit"
 ]

node资源

curl heapster/api/v1/model/nodes  
[
  "k8snode4",
  "k8snode2",
  "k8snode3",
  "k8snode1",
  "k8smaster"
 ]


 curl heapster/api/v1/model/nodes/k8snode1/metrics
 [
   "memory/usage",
   "memory/major_page_faults",
   "cpu/usage",
   "network/tx_errors",
   "network/tx",
   "memory/limit",
   "memory/node_capacity",
   "cpu/limit",
   "memory/node_reservation",
   "network/tx_errors_rate",
   "cpu/request",
   "cpu/node_capacity",
   "cpu/node_utilization",
   "uptime",
   "network/rx_rate",
   "memory/page_faults_rate",
   "network/tx_rate",
   "cpu/usage_rate",
   "cpu/node_reservation",
   "memory/node_utilization",
   "network/rx_errors",
   "cpu/node_allocatable",
   "memory/working_set",
   "network/rx",
   "network/rx_errors_rate",
   "memory/request",
   "memory/page_faults",
   "memory/major_page_faults_rate",
   "memory/node_allocatable"
  ]

pod资源

curl heapster/api/v1/model/namespaces/default/pods
[
  "mongo-supervisor-890850868-wc3jt",
  "zk-1",
  "coffee-rc-rr1wv"
]

curl heapster/api/v1/model/namespaces/default/pods/zk-1/metrics
[
  "memory/usage",
  "cpu/usage",
  "cpu/request",
  "network/tx_errors_rate",
  "network/rx_errors_rate",
  "uptime",
  "network/rx_errors",
  "memory/limit",
  "memory/working_set",
  "cpu/usage_rate",
  "memory/request",
  "network/rx_rate",
  "network/tx_errors",
  "memory/major_page_faults_rate",
  "memory/major_page_faults",
  "cpu/limit",
  "network/tx",
  "memory/page_faults_rate",
  "memory/page_faults",
  "network/rx",
  "network/tx_rate"
 ]

你可能感兴趣的:(Kubernetes)