From 4dbb76c25d282b7296ff770b7c7ec096a3338212 Mon Sep 17 00:00:00 2001 From: zhuxiujuan28 <562873187@qq.com> Date: Thu, 19 Dec 2024 15:07:21 +0800 Subject: [PATCH] add metrics guide Signed-off-by: zhuxiujuan28 <562873187@qq.com> --- .../workloads/workloads-desc-workloads.adoc | 2 +- .../09-edit-auto-scaling-settings.adoc | 37 --------------- .../03-workloads/_index.adoc | 2 +- .../01-edit-auto-scaling-settings.adoc | 45 ++++++++++++++++++ .../24-metrics-server/_index.adoc | 23 ++++++++++ .../workloads/workloads-desc-workloads.adoc | 2 +- .../09-edit-auto-scaling-settings.adoc | 37 --------------- .../03-workloads/_index.adoc | 2 +- .../01-edit-auto-scaling-settings.adoc | 46 +++++++++++++++++++ .../24-metrics-server/_index.adoc | 24 ++++++++++ static/images/ks-qkcp/zh/icons/clock-2.svg | 4 ++ 11 files changed, 146 insertions(+), 78 deletions(-) delete mode 100644 content/en/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc create mode 100644 content/en/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc create mode 100644 content/en/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc delete mode 100644 content/zh/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc create mode 100644 content/zh/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc create mode 100644 content/zh/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc create mode 100644 static/images/ks-qkcp/zh/icons/clock-2.svg diff --git a/content/en/docs/_custom-en/clusterManagement/workloads/workloads-desc-workloads.adoc b/content/en/docs/_custom-en/clusterManagement/workloads/workloads-desc-workloads.adoc index e7768fb14..c663f7556 100644 --- a/content/en/docs/_custom-en/clusterManagement/workloads/workloads-desc-workloads.adoc +++ b/content/en/docs/_custom-en/clusterManagement/workloads/workloads-desc-workloads.adoc @@ -3,7 +3,7 @@ This section explains how to manage workloads. In KubeSphere, applications run in pods. To ensure business continuity in case of pod failures, it is common to create multiple replicas of a pod for an application. Workloads are responsible for managing replicas of pods and provide the following key functionalities: -* Automatically scale the number of pod replicas based on user-defined conditions. +// * Automatically scale the number of pod replicas based on user-defined conditions. * Automatically update pods based on user-specified update strategies. * Roll back pods to previous versions. diff --git a/content/en/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc b/content/en/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc deleted file mode 100644 index bdc26c9b0..000000000 --- a/content/en/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "Edit Autoscaling Settings" -linkTitle: "Edit Autoscaling Settings" -keywords: "Kubernetes, KubeSphere, Cluster Management, Application Workloads, Workloads, Edit Autoscaling" -description: "Learn how to edit autoscaling settings for workloads." -weight: 09 ---- - -:ks_permission: **Application Workload Management** -:ks_navigation: **Application Workloads > Workloads** - - -include::../../../../_custom-en/clusterManagement/workloads/workloads-desc-editAutoScaling.adoc[] - - -== Prerequisites - - -include::../../../../_custom-en/clusterManagement/clusterManagement-prer-requiredPermission_new.adoc[] - - - -== Steps - -include::../../../../_custom-en/clusterManagement/clusterManagement-oper-openClusterPage.adoc[] - -+ - -include::../../../../../_ks_components-en/oper-navigate.adoc[] - -+ - -include::../../../../_custom-en/clusterManagement/workloads/workloads-oper-openDetailsPage.adoc[] - -+ - -include::../../../../_custom-en/clusterManagement/workloads/workloads-oper-editAutoScalingSettings.adoc[] diff --git a/content/en/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc b/content/en/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc index 6a3dbfd43..7ac07265e 100644 --- a/content/en/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc +++ b/content/en/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc @@ -12,7 +12,7 @@ This section describes how to manage workloads. In KubeSphere, applications run in pods. To ensure business continuity when a single pod fails, it is usually necessary to create multiple pod replicas for an application. Workloads are resources used to manage pod replicas, responsible for managing multiple pod replicas of an application, and mainly provide the following functions: -* Automatically scale the number of pod replicas based on user-defined conditions. +// * Automatically scale the number of pod replicas based on user-defined conditions. * Automatically update pods based on the update strategy specified by the user. diff --git a/content/en/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc b/content/en/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc new file mode 100644 index 000000000..33b9a73aa --- /dev/null +++ b/content/en/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc @@ -0,0 +1,45 @@ +--- +title: "Edit Autoscaling Settings" +keywords: "Kubernetes, {ks_product-en}, Application Workloads, Workloads, Edit Autoscaling" +description: "Learn how to edit autoscaling settings for workloads." +weight: 01 +--- + +:ks_permission: **Application Workload Management** +:ks_navigation: **Application Workloads > Workloads** + + +include::../../../_custom-en/clusterManagement/workloads/workloads-desc-editAutoScaling.adoc[] + + +== Prerequisites + + +:relfileprefix: ../../../ + +include::../../../_custom-en/clusterManagement/clusterManagement-prer-requiredPermission_clusterandproject.adoc[] + +:relfileprefix: ./ + + +== Steps + +. Log in to the {ks_product-en} web console with a user who has the pass:a,q[{ks_permission}] permission, and access your cluster or project. + ++ + +include::../../../../_ks_components-en/oper-navigate.adoc[] + ++ + +. On the **Workloads** page, click **Deployments** or **StatefulSets** to open the list of workloads. + ++ + +include::../../../_custom-en/clusterManagement/workloads/workloads-oper-editAutoScalingSettings.adoc[] + ++ + +After the settings are complete, you can see image:/images/ks-qkcp/zh/icons/clock-2.svg[scaling,18,18] in the Status column on the Deployment or StatefulSet list page, indicating that the pod horizontal autoscaling policy has been set. + +. On the **Resource Status** tab of the workload details page, click image:/images/ks-qkcp/zh/icons/more.svg[more,18,18] > **Cancel** next to Autoscaling to delete the autoscaling settings. \ No newline at end of file diff --git a/content/en/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc b/content/en/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc new file mode 100644 index 000000000..bcf35ccf8 --- /dev/null +++ b/content/en/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc @@ -0,0 +1,23 @@ +--- +title: "Metrics Server" +keywords: "Kubernetes, {ks_product-en}, Metrics Server, Horizontal Autoscaling, Vertical Autoscaling" +description: "Introduce how to use the Metrics Server extension." +weight: 24 +layout: "second" +--- + + +Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines. + +You can use Metrics Server for: + +* CPU/Memory based horizontal autoscaling (link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[Horizontal Autoscaling]) +* Automatically adjusting/suggesting resources needed by containers (link:https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/[Vertical Autoscaling]) + +[.admon.note,cols="a"] +|=== +|Note + +| +For more information about the extension, see the details page of the "Metrics Server" extension in the Extensions Center. +|=== \ No newline at end of file diff --git a/content/zh/docs/_custom/clusterManagement/workloads/workloads-desc-workloads.adoc b/content/zh/docs/_custom/clusterManagement/workloads/workloads-desc-workloads.adoc index 9783d87f4..b32cabe07 100644 --- a/content/zh/docs/_custom/clusterManagement/workloads/workloads-desc-workloads.adoc +++ b/content/zh/docs/_custom/clusterManagement/workloads/workloads-desc-workloads.adoc @@ -3,7 +3,7 @@ 在{ks_product_both}平台,应用程序运行在容器组中。为确保单个容器组出现故障时业务不会中断,通常需要为一个应用程序创建多个容器组副本。工作负载是用于管理容器组副本的资源,负责对一个应用程序的多个容器组副本进行管理,主要提供以下功能: -* 根据用户设定的条件自动扩缩容器组副本数量。 +// * 根据用户设定的条件自动扩缩容器组副本数量。 * 根据用户指定的更新策略自动更新容器组。 diff --git a/content/zh/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc b/content/zh/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc deleted file mode 100644 index b504bee22..000000000 --- a/content/zh/docs/v4.1/07-cluster-management/05-application-workloads/01-workloads/09-edit-auto-scaling-settings.adoc +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "编辑自动扩缩设置" -linkTitle: "编辑自动扩缩设置" -keywords: "Kubernetes, KubeSphere, 集群管理, 应用负载, 工作负载, 编辑自动扩缩" -description: "介绍如何编辑工作负载的自动扩缩设置。" -weight: 09 ---- - -:ks_permission: **应用负载管理** -:ks_navigation: **应用负载 > 工作负载** - - -include::../../../../_custom/clusterManagement/workloads/workloads-desc-editAutoScaling.adoc[] - - -== 前提条件 - - -include::../../../../_custom/clusterManagement/clusterManagement-prer-requiredPermission_new.adoc[] - - - -== 操作步骤 - -include::../../../../_custom/clusterManagement/clusterManagement-oper-openClusterPage.adoc[] - -+ - -include::../../../../../_ks_components/oper-navigate.adoc[] - -+ - -include::../../../../_custom/clusterManagement/workloads/workloads-oper-openDetailsPage.adoc[] - -+ - -include::../../../../_custom/clusterManagement/workloads/workloads-oper-editAutoScalingSettings.adoc[] diff --git a/content/zh/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc b/content/zh/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc index 640b996eb..b7e23b19e 100644 --- a/content/zh/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc +++ b/content/zh/docs/v4.1/11-use-extensions/04-kubefed/03-application-workloads/03-workloads/_index.adoc @@ -12,7 +12,7 @@ layout: "second" 在{ks_product_both}平台,应用程序运行在容器组中。为确保单个容器组出现故障时业务不会中断,通常需要为一个应用程序创建多个容器组副本。工作负载是用于管理容器组副本的资源,负责对一个应用程序的多个容器组副本进行管理,主要提供以下功能: -* 根据用户设定的条件自动扩缩容器组副本数量。 +// * 根据用户设定的条件自动扩缩容器组副本数量。 * 根据用户指定的更新策略自动更新容器组。 diff --git a/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc b/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc new file mode 100644 index 000000000..a74607ff7 --- /dev/null +++ b/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/01-edit-auto-scaling-settings.adoc @@ -0,0 +1,46 @@ +--- +title: "编辑自动扩缩设置" +keywords: "Kubernetes, {ks_product}, 应用负载, 工作负载, 编辑自动扩缩" +description: "介绍如何编辑工作负载的自动扩缩设置。" +weight: 01 +--- + +:ks_permission: **应用负载管理** +:ks_navigation: **应用负载 > 工作负载** + + +include::../../../_custom/clusterManagement/workloads/workloads-desc-editAutoScaling.adoc[] + + +== 前提条件 + + +:relfileprefix: ../../../ + +include::../../../_custom/clusterManagement/clusterManagement-prer-requiredPermission_clusterandproject.adoc[] + +:relfileprefix: ./ + + + +== 操作步骤 + +. 以具有pass:a,q[{ks_permission}]权限的用户登录{ks_product_left} Web 控制台并进入您的集群或项目。 + ++ + +include::../../../../_ks_components/oper-navigate.adoc[] + ++ + +. 在**工作负载**页面,点击**部署**或**有状态副本集**,然后在列表中点击一个工作负载的名称打开其详情页面。 + ++ + +include::../../../_custom/clusterManagement/workloads/workloads-oper-editAutoScalingSettings.adoc[] + ++ + +设置完成后,在部署或有状态副本集列表页的状态栏中,会出现image:/images/ks-qkcp/zh/icons/clock-2.svg[scaling,18,18],表示已设置容器组水平自动扩缩策略。 + +. 在工作负载详情页的**资源状态**页签,点击自动扩缩右侧的image:/images/ks-qkcp/zh/icons/more.svg[more,18,18] > **取消**,可删除自动扩缩设置。 diff --git a/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc b/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc new file mode 100644 index 000000000..045d83389 --- /dev/null +++ b/content/zh/docs/v4.1/11-use-extensions/24-metrics-server/_index.adoc @@ -0,0 +1,24 @@ +--- +title: "Metrics Server" +keywords: "Kubernetes, {ks_product}, Metrics Server, 水平扩缩, 垂直扩缩" +description: "介绍如何使用 Metrics Server 扩展组件。" +weight: 24 +layout: "second" +--- + + +Metrics Server 是一个可扩展、高效的容器资源度量源,为 Kubernetes 内置的自动扩展管道提供服务。 + +Metrics Server 可实现如下功能: + +* 基于 CPU/内存的水平自动缩放(link:https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[Horizontal Autoscaling]) +* 自动调整/建议容器所需的资源(link:https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/[Vertical Autoscaling]) + + +[.admon.note,cols="a"] +|=== +|说明 + +| +有关组件的更多信息,请参阅扩展中心 Metrics Server 扩展组件的详情页说明。 +|=== \ No newline at end of file diff --git a/static/images/ks-qkcp/zh/icons/clock-2.svg b/static/images/ks-qkcp/zh/icons/clock-2.svg new file mode 100644 index 000000000..387e7477a --- /dev/null +++ b/static/images/ks-qkcp/zh/icons/clock-2.svg @@ -0,0 +1,4 @@ + + + +