Kubernetes Metrics Server
Add-on Overview
From version 1.8 onwards, Kubernetes provides resource usage metrics, such as the container CPU and memory usage, through the Metrics API. These metrics can be directly accessed by users (for example, by using the kubectl top command) or used by controllers (for example, Horizontal Pod Autoscaler) in a cluster for decision-making. The specific component is metrics-server, which is used to substitute for Heapster for providing the similar functions. Heapster has been gradually abandoned since v1.11.
Add-on Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
basic |
No |
object |
Basic configuration parameters, which do not need to be specified |
flavor |
Yes |
Table 2 object |
Flavor parameters |
custom |
Yes |
Table 3 object |
Custom parameters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
description |
No |
String |
Add-on description |
name |
Yes |
String |
Add-on specification name. The value is fixed at Single-instance. |
replicas |
Yes |
String |
Number of pods. The default value is 1. |
resources |
Yes |
resources object |
Container resource (CPU and memory) quotas |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
multiAZBalance |
No |
Bool |
Whether the equivalent mode of multi-AZ deployment is enabled. If this function is enabled, the equivalent mode is used. |
multiAZEnabled |
No |
Bool |
Whether to deploy the add-on pods in multiple AZs. The default value is false. If this parameter is set to true, cross-AZ deployment is forcibly performed. If this parameter is set to false, cross-AZ deployment is preferred. |
tolerations |
No |
List<Object> Table 6 |
Tolerations of the add-on |
node_match_expressions |
No |
List<Object> Table 6 |
Node affinity configuration of the add-on |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limitsCpu |
Yes |
String |
CPU size limit (unit: m) |
limitsMem |
Yes |
String |
Memory size limit (unit: Mi) |
name |
Yes |
String |
Add-on name. The value is fixed at metrics-server. |
requestsCpu |
Yes |
String |
Requested CPU size (unit: m) |
requestsMem |
Yes |
String |
Requested memory size (unit: Mi) |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
No |
String |
Taint key |
effect |
No |
String |
Taint policy |
operator |
No |
String |
Operator |
tolerationSeconds |
No |
Int |
Toleration time window |
Example Request
{ "kind": "Addon", "apiVersion": "v3", "metadata": { "annotations": { "addon.install/type": "install" } }, "spec": { "clusterID": "b78fb690-b82c-11ee-83cf-0255ac100b0f", "version": "1.3.39", "addonTemplateName": "metrics-server", "values": { "basic": { "image_version": "v0.6.2", "swr_addr": "***", "swr_user": "***", "rbac_enabled": true, "cluster_version": "v1.23" }, "flavor": { "description": "Has only one instance", "name": "Single", "replicas": 1, "resources": [ { "limitsCpu": "1000m", "limitsMem": "1000Mi", "name": "metrics-server", "requestsCpu": "100m", "requestsMem": "300Mi" } ], "category": [ "CCE", "Turbo" ] }, "custom": { "annotations": {}, "multiAZBalance": false, "multiAZEnabled": false, "node_match_expressions": [], "tolerations": [ { "key": "node.kubernetes.io/not-ready", "operator": "Exists", "effect": "NoExecute", "tolerationSeconds": 60 }, { "key": "node.kubernetes.io/unreachable", "operator": "Exists", "effect": "NoExecute", "tolerationSeconds": 60 } ] } } } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot