|
| 1 | +--- |
| 2 | +reviewers: [] |
| 3 | +title: Autoscaling Workloads |
| 4 | +description: >- |
| 5 | + With Autoscaling, you can automatically update your workloads or infrastructure in one way or another. This allows your cluster to react to changes in resource demand more elastically and efficiently. |
| 6 | +content_type: concept |
| 7 | +weight: 40 |
| 8 | +hide_summary: true # Listed separately in section index |
| 9 | +--- |
| 10 | + |
| 11 | +<!-- overview --> |
| 12 | + |
| 13 | +The concept of _Autoscaling_ in Kubernetes refers to the ability to automatically update the available |
| 14 | +resources of your cluster. This can be either a replication controller (for example a |
| 15 | +{{< glossary_tooltip text="Deployment" term_id="deployment" >}} or |
| 16 | +{{< glossary_tooltip text="ReplicaSet" term_id="replica-set" >}}), or the cluster infrastructure |
| 17 | +itself (for example the number of {{< glossary_tooltip text="Nodes" term_id="node" >}}). |
| 18 | + |
| 19 | +Besides the differentiation in _what_ is being scaled, there are also different options for _how_ to scale: |
| 20 | + |
| 21 | +- scale the number of available instances (such as Pods or Nodes) |
| 22 | +- scale the available resources on existing instances themselves (such as CPU or memory) |
| 23 | + |
| 24 | +The first option is referred to as _horizontal scaling_, while the second is referred to as _vertical scaling_. |
| 25 | + |
| 26 | +<!-- body --> |
| 27 | + |
| 28 | +## Scaling Workloads Horizontally |
| 29 | + |
| 30 | +In Kubernetes, you can scale a workload horizontally using a _HorizontalPodAutoscaler_ (HPA). |
| 31 | +It is implemented as a Kubernetes API resource and a {{< glossary_tooltip text="controller" term_id="controller" >}} |
| 32 | +and periodically adjusts the number of {{< glossary_tooltip text="replicas" term_id="replica" >}} |
| 33 | +in a workload to match observed resource utilization such as CPU or memory usage. |
| 34 | + |
| 35 | +There is a [walkthrough example](../../../tasks/run-application/horizontal-pod-autoscale-walkthrough.md) of configuring a HorizontalPodAutoscaler for a Deployment. |
| 36 | + |
| 37 | +## Scaling Workloads Vertically |
| 38 | + |
| 39 | +_tba_ about VerticalPodAutoscaler |
| 40 | + |
| 41 | +## Scaling the Cluster |
| 42 | + |
| 43 | +_tba_ about Cluster Autoscaler and Karpenter |
| 44 | + |
| 45 | +## Advanced Scenarios |
| 46 | + |
| 47 | +_tba_ about Cluster Proportional Autoscaler, KEDA, and KNative Autoscaler |
| 48 | + |
| 49 | +## {{% heading "whatsnext" %}} |
| 50 | + |
| 51 | +- item 1 |
| 52 | +- item 2 |
| 53 | + - subitem 1 |
| 54 | + - subitem 2 |
| 55 | +- item 3 |
0 commit comments