From ff6d28472f153cf358cffe3569333e733b8d6a1e Mon Sep 17 00:00:00 2001 From: irfanurrehman Date: Tue, 26 Sep 2017 06:48:00 +0530 Subject: [PATCH] Federated Hpa feature doc (#5487) * Federated Hpa feature doc * Federated Hpa feature doc review fixes * Update hpa.md * Update hpa.md --- _data/tasks.yml | 1 + .../cluster-administration/federation.md | 1 + docs/tasks/administer-federation/hpa.md | 177 ++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 docs/tasks/administer-federation/hpa.md diff --git a/_data/tasks.yml b/_data/tasks.yml index b65ad0c8712ab..3c8b934f843d4 100644 --- a/_data/tasks.yml +++ b/_data/tasks.yml @@ -174,6 +174,7 @@ toc: - docs/tasks/administer-federation/daemonset.md - docs/tasks/administer-federation/deployment.md - docs/tasks/administer-federation/events.md + - docs/tasks/administer-federation/hpa.md - docs/tasks/administer-federation/ingress.md - docs/tasks/administer-federation/job.md - docs/tasks/administer-federation/namespaces.md diff --git a/docs/concepts/cluster-administration/federation.md b/docs/concepts/cluster-administration/federation.md index 7c8077f2893f0..24af94dcef998 100644 --- a/docs/concepts/cluster-administration/federation.md +++ b/docs/concepts/cluster-administration/federation.md @@ -91,6 +91,7 @@ The following guides explain some of the resources in detail: * [DaemonSets](/docs/tasks/administer-federation/daemonset/) * [Deployment](/docs/tasks/administer-federation/deployment/) * [Events](/docs/tasks/administer-federation/events/) +* [Hpa](/docs/tasks/administer-federation/hpa/) * [Ingress](/docs/tasks/administer-federation/ingress/) * [Jobs](docs/tasks/administer-federation/job/) * [Namespaces](/docs/tasks/administer-federation/namespaces/) diff --git a/docs/tasks/administer-federation/hpa.md b/docs/tasks/administer-federation/hpa.md new file mode 100644 index 0000000000000..ae1dfb6448781 --- /dev/null +++ b/docs/tasks/administer-federation/hpa.md @@ -0,0 +1,177 @@ +--- +title: Federated Horizontal Pod Autoscalers (HPA) +--- + +{% capture overview %} + +{% include feature-state-alpha.md %} + +This guide explains how to use federated horizontal pod autoscalers (HPAs) in the federation control plane. + +HPAs in the federation control plane are similar to the traditional [Kubernetes +HPAs](/docs/tasks/run-application/horizontal-pod-autoscale/), and provide the same functionality. +Creating an HPA targeting a federated object in the federation control plane ensures that the +desired number of replicas of the target object are scaled across the registered clusters, +instead of a single cluster. Also, the control plane keeps monitoring the status of each +individual HPA in the federated clusters and ensures the workload replicas move where they are +needed most by manipulating the min and max limits of the HPA objects in the federated clusters. +{% endcapture %} + +{% capture prerequisites %} + +* {% include federated-task-tutorial-prereqs.md %} +* You are also expected to have a basic +[working knowledge of Kubernetes](/docs/getting-started-guides/) in +general and [HPAs](/docs/tasks/run-application/horizontal-pod-autoscale/) in particular. + +The federated HPA is an alpha feature. The API is not enabled by default on the +federated API server. To use this feature, the user or the admin deploying the federation control +plane needs to run the federated API server with option `--runtime-config=api/all=true` to +enable all APIs, including alpha APIs. Additionally, the federated HPA only works +when used with CPU utilization metrics. +{% endcapture %} + +{% capture steps %} + +## Creating a federated HPA + +The API for federated HPAs is 100% compatible with the +API for traditional Kubernetes HPA. You can create an HPA by sending +a request to the federation API server. + +You can do that with [kubectl](/docs/user-guide/kubectl/) by running: + +```shell +cat <