Installing a Metric Collection Add-on
Before creating a FederatedHPA, you need to install the add-on that supports metrics APIs for a cluster to collect workload metrics. If you have installed the add-on, skip this step.
Selecting an Add-on
UCS provides two types of add-ons: Kubernetes Metrics Server and kube-prometheus-stack. The add-ons apply to different cluster and metric types. For details about how to select an add-on, see Table 1.
Applicable Cluster Type |
Supported Metric Type |
Add-on |
Precautions |
---|---|---|---|
Huawei Cloud clusters |
System metrics |
Install Kubernetes Metrics Server or kube-prometheus-stack. |
After installing kube-prometheus-stack, you need to register it as a service that provides the metrics API. For details, see Providing Resource Metrics Through the Metrics API. |
Custom metrics |
Install kube-prometheus-stack. |
|
|
Non-Huawei Cloud clusters |
System metrics |
Install Kubernetes Metrics Server. |
For details, see Installing an Add-on. |
Custom metrics |
No add-on available. |
To collect custom metrics of a non-Huawei Cloud cluster, you need to install Prometheus Adapter and configure a custom metric collection rule. Then create a FederatedHPA. |
Installing an Add-on
After selecting an applicable add-on, install it for the cluster by referring to the precautions in Table 1 and related documents.
Install the metric collection add-on for all clusters in a federation for which a scaling policy needs to be created. Otherwise, metric collection will be abnormal and the scaling policy will become invalid.
- For details about how to install Kubernetes Metrics Server, see Kubernetes Metrics Server.
- For details about how to install kube-prometheus-stack, see kube-prometheus-stack.
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