Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
Metrics Server collects resource metrics from Kubelets and exposes them in Kubernetes apiserver through Metrics API
for use by Horizontal Pod Autoscaler and Vertical Pod Autoscaler. Metrics API can also be accessed by kubectl top
,
making it easier to debug autoscaling pipelines.
Metrics Server is not meant for non-autoscaling purposes. For example, don't use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics.
Metrics Server offers:
You can use Metrics Server for:
Don't use Metrics Server when you need:
For unsupported use cases, check out full monitoring solutions like Prometheus.
Metrics Server has specific requirements for cluster and network configuration. These requirements aren't the default for all cluster distributions. Please ensure that your cluster distribution supports these requirements before using Metrics Server:
Latest Metrics Server release can be installed by running:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Installation instructions for previous releases can be found in Metrics Server releases.
WARNING: You should no longer use manifests from master
branch (previously available in deploy/kubernetes
directory).
They are now meant solely for development.
Compatibility matrix:
Metrics Server | Metrics API group/version | Supported Kubernetes version |
---|---|---|
0.4.x | metrics.k8s.io/v1beta1 |
1.8+ |
0.3.x | metrics.k8s.io/v1beta1 |
1.8+ |
Starting from v0.5.0 Metrics Server comes with default resource requests that should guarantee good performance for most cluster configurations up to 100 nodes:
If neeed resources can be scaled proportionally based on the number of nodes (minimum of 10 nodes). For example, clusters up to 10 nodes can request 10m core CPU and 30MiB memory. Please remember that lowering resources will also proportionally reduce other thresholds like maximum number of autoscaled deployments (down to 10 for 10 node clusters).
Metrics Server resource usage depends on multiple independent dimensions, creating a Scalability Envelope. Default Metrics Server configuration should work in clusters that don't exceed any of the thresholds listed below:
Quantity | Namespace threshold | Cluster threshold |
---|---|---|
#Nodes | n/a | 100 |
#Pods | 7000 | 7000 |
#Deployments + HPA | 100 | 100 |
For clusters of more than 100 nodes, allocate additionally:
Depending on your cluster setup, you may also need to change flags passed to the Metrics Server container. Most useful flags:
--kubelet-preferred-address-types
- The priority of node address types used when determining an address for connecting to a particular node (default [Hostname,InternalDNS,InternalIP,ExternalDNS,ExternalIP])--kubelet-insecure-tls
- Do not verify the CA of serving certificates presented by Kubelets. For testing purposes only.--requestheader-client-ca-file
- Specify a root certificate bundle for verifying client certificates on incoming requests.You can get a full list of Metrics Server configuration flags by running:
docker run --rm k8s.gcr.io/metrics-server/metrics-server:v0.3.7 --help
This Helm chart can deploy the metric-server service in your cluster.
Note: This Helm chart isn't supported by Metrics Server maintainers.
Metrics Server is a component in the core metrics pipeline described in Kubernetes monitoring architecture.
For more information, see:
Before posting it an issue, first checkout Frequently Asked Questions and Known Issues.
Learn how to engage with the Kubernetes community on the community page.
You can reach the maintainers of this project at:
This project is maintained by SIG Instrumentation
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。