kubernetes-handbook/practice/heapster.md

12 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Heapster
Heapster作为kubernetes安装过程中默认安装的一个插件见[安装heapster插件](heapster-addon-installation.md)。这对于集群监控十分有用,同时在[Horizontal Pod Autoscaling](../concepts/horizontal-pod-autoscaling.md)中也用到了HPA将Heapster作为`Resource Metrics API`向其获取metric做法是在`kube-controller-manager` 中配置`--api-server`指向[kube-aggregator](https://github.com/kubernetes/kube-aggregator)也可以使用heapster来实现通过在启动heapster的时候指定`--api-server=true`。
Heapster可以收集Node节点上的cAdvisor数据还可以按照kubernetes的资源类型来集合资源比如Pod、Namespace域可以分别获取它们的CPU、内存、网络和磁盘的metric。默认的metric数据聚合时间间隔是1分钟。
**注意** Kubernetes 1.11 不建议使用 Heapster就 SIG Instrumentation 而言,这是为了转向新的 Kubernetes 监控模型的持续努力的一部分。仍使用 Heapster 进行自动扩展的集群应迁移到 [metrics-server](https://github.com/kubernetes-incubator/metrics-server) 和自定义指标 API。
## 参考
- [metrics-server - github.com](https://github.com/kubernetes-incubator/metrics-server)