Skip to content

Commit 509e265

Browse files
committed
Finalize first draft
1 parent e2950c6 commit 509e265

File tree

1 file changed

+36
-19
lines changed

1 file changed

+36
-19
lines changed

content/en/docs/concepts/workloads/autoscaling.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ See below for examples of both strategies.
3232
- **Horizontal scaling**: [Running multiple instances of your app](/docs/tutorials/kubernetes-basics/scale/scale-intro/)
3333
- **Vertical scaling**: [Resizing CPU and memory resources assigned to containers](/docs/tasks/configure-pod-container/resize-container-resources)
3434

35-
{{< note >}}
36-
Resizing a workload in-place **without** restarting the {{< glossary_tooltip text="Pods" term_id="pod" >}}
37-
or its {{< glossary_tooltip text="Containers" term_id="container" >}} requires Kubernetes version 1.27 or later.
38-
{{< /note >}}
39-
4035
## Scaling workloads automatically
4136

4237
Kubernetes also supports _automatic scaling_ of workloads, which is the focus of this page.
@@ -57,6 +52,8 @@ There is a [walkthrough tutorial](/docs/tasks/run-application/horizontal-pod-aut
5752

5853
### Scaling workloads vertically
5954

55+
{{< feature-state for_k8s_version="v1.25" state="stable" >}}
56+
6057
You can automatically scale a workload vertically using a _VerticalPodAutoscaler_ (VPA).
6158
Different to the HPA, the VPA doesn't come with Kubernetes by default, but is a separate project
6259
that can be found [on GitHub](https://github.com/kubernetes/autoscaler/tree/9f87b78df0f1d6e142234bb32e8acbd71295585a/vertical-pod-autoscaler).
@@ -65,12 +62,11 @@ Once installed, it allows you to create {{< glossary_tooltip text="CustomResourc
6562
(CRDs) for your workloads which define _how_ and _when_ to scale the resources of the managed replicas.
6663

6764
{{< note >}}
68-
The current default version of the HPA (**v0.14.0**) requires **Kubernetes version 1.25** or later.
69-
You will also need to have the [Metrics Server](https://github.com/kubernetes-sigs/metrics-server)
70-
installed to your cluster.
65+
You will need to have the [Metrics Server](https://github.com/kubernetes-sigs/metrics-server)
66+
installed to your cluster for the HPA to work.
7167
{{< /note >}}
7268

73-
At the moment, the VPA operates can operate in four different modes:
69+
At the moment, the VPA can operate in four different modes:
7470

7571
{{< table caption="Different modes of the VPA" >}}
7672
Mode | Description
@@ -81,14 +77,25 @@ Mode | Description
8177
`Off` | The VPA does not automatically change the resource requirements of the pods. The recommendations are calculated and can be inspected in the VPA object.
8278
{{< /table >}}
8379

80+
#### Requirements for in-place resizing
81+
82+
{{< feature-state for_k8s_version="v1.27" state="alpha" >}}
83+
84+
Resizing a workload in-place **without** restarting the {{< glossary_tooltip text="Pods" term_id="pod" >}}
85+
or its {{< glossary_tooltip text="Containers" term_id="container" >}} requires Kubernetes version 1.27 or later.<br />
86+
Additionally, the `InPlaceVerticalScaling` feature gate needs to be enabled.
87+
88+
{{< feature-gate-description name="InPlacePodVerticalScaling" >}}
89+
8490
### Autoscaling based on cluster size
8591

8692
For workloads that need to be scaled based on the size of the cluster (for example
8793
`cluster-dns` or other system components), you can use the _Cluster Proportional Autoscaler_.<br />
8894
Just like the VPA, it is not part of the Kubernetes core, but hosted in its
8995
own repository [on GitHub](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler).
9096

91-
The Cluster Proportional Autoscaler watches the number of schedulable {{< glossary_tooltip text="nodes" term_id="node" >}} and cores and scales the number of replicas of the target workload accordingly.
97+
The Cluster Proportional Autoscaler watches the number of schedulable {{< glossary_tooltip text="nodes" term_id="node" >}}
98+
and cores and scales the number of replicas of the target workload accordingly.
9299

93100
### Event driven Autoscaling
94101

@@ -101,20 +108,30 @@ a wide range of adapters for different event sources to choose from.
101108

102109
### Autoscaling based on schedules
103110

104-
_tbd_
111+
Another strategy for scaling your workloads is to **schedule** the scaling operations, for example in order to
112+
reduce resource consumption during off-peak hours.
113+
114+
Similar to event driven autoscaling, such behavior can be achieved using KEDA in conjunction with
115+
its [`Cron` scaler](https://keda.sh/docs/2.13/scalers/cron/). The `Cron` scaler allows you to define schedules
116+
(and time zones) for scaling your workloads in or out.
105117

106118
## Scaling cluster infrastructure
107119

108-
_tbd_, short summary
120+
If scaling workloads isn't enough to meet your needs, you can also scale your cluster infrastructure itself.
121+
122+
Scaling the cluster infrastructure normally means adding or removing {{< glossary_tooltip text="nodes" term_id="node" >}}.
123+
This can be done using one of two available autoscalers:
109124

110-
## Third-party Autoscalers
125+
- [**Cluster Autoscaler**](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler)
126+
- [**Karpenter**](https://github.com/kubernetes-sigs/karpenter?tab=readme-ov-file)
111127

112-
_tbd_, short summary of KEDA and KNative autoscalers
128+
Both scalers work by watching for pods marked as _unschedulable_ or _underutilized_ nodes and then adding or
129+
removing nodes as needed.
113130

114131
## {{% heading "whatsnext" %}}
115132

116-
- item 1
117-
- item 2
118-
- subitem 1
119-
- subitem 2
120-
- item 3
133+
- Learn more about scaling horizontally
134+
- [Scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/)
135+
- [HorizontalPodAutoscaler Walkthrough](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)
136+
- [Resize Container Resources In-Place](/docs/tasks/configure-pod-container/resize-container-resources/)
137+
- [Autoscale the DNS Service in a Cluster](/docs/tasks/administer-cluster/dns-horizontal-autoscaling/)

0 commit comments

Comments
 (0)