Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster scaling #2370

Merged
merged 40 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cd770d7
Fix menu layout
pipo02mix Oct 31, 2024
ee13014
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 4, 2024
7e58227
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 8, 2024
07259f5
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 11, 2024
8c02bc1
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 22, 2024
32826e9
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 25, 2024
f13d72e
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 26, 2024
4be15bf
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 26, 2024
6a8a7fb
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 28, 2024
5226baa
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 28, 2024
90a3280
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 28, 2024
ec8bf59
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
5bcf3e3
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
f45f5be
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
2d35a47
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
9b477ef
Add cluster autoscaler tutorial
pipo02mix Nov 29, 2024
51b76c5
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
9caeae5
Merge branch 'main' into cluster-scaling
pipo02mix Nov 29, 2024
240d425
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Nov 29, 2024
e04c77a
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 2, 2024
ce17f5c
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 3, 2024
7032544
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 3, 2024
b3a3f28
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 5, 2024
779e1fb
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 9, 2024
e04f972
Merge branch 'main' into cluster-scaling
pipo02mix Dec 10, 2024
54290f1
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 12, 2024
286b448
'main' of github.com:giantswarm/docs
pipo02mix Dec 13, 2024
bb865c3
Fix review issues workflow
pipo02mix Dec 13, 2024
fdf3a7e
Update src/content/tutorials/fleet-management/cluster-management/clus…
pipo02mix Dec 13, 2024
c481dc8
Merge branch 'main' of github.com:giantswarm/docs
pipo02mix Dec 13, 2024
4df8ca5
Merge branch 'main' into cluster-scaling
pipo02mix Dec 13, 2024
fc9dfce
Merge branch 'main' into cluster-scaling
pipo02mix Dec 13, 2024
ade6a8d
Merge branch 'main' into cluster-scaling
pipo02mix Dec 13, 2024
f6e1da2
Update src/content/tutorials/fleet-management/cluster-management/clus…
pipo02mix Dec 13, 2024
5db28fa
Update src/content/tutorials/fleet-management/cluster-management/clus…
pipo02mix Dec 13, 2024
6e121a3
Apply suggestions from code review
pipo02mix Dec 13, 2024
ef1e42a
Address comments
pipo02mix Dec 13, 2024
1fd2773
Address comments
pipo02mix Dec 13, 2024
61789b2
Update src/content/tutorials/fleet-management/cluster-management/clus…
pipo02mix Dec 13, 2024
f1f9e9d
Merge branch 'main' into cluster-scaling
pipo02mix Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
linkTitle: Cluster autoscaler
title: Advanced cluster autoscaler configuration
description: Here we describe how you can customize the configuration of the managed cluster autoscaler service in your workload clusters.
weight: 90
menu:
principal:
parent: tutorials-fleet-management-clusters
identifier: tutorials-fleet-management-clusters-cluster-autoscaler
marians marked this conversation as resolved.
Show resolved Hide resolved
user_questions:
- Where can I find the ConfigMap to configure cluster-autoscaler?
- What cluster-autoscaler options can I configure?
last_review_date: 2024-12-13
owner:
- https://github.com/orgs/giantswarm/teams/team-phoenix
---

In Giant Swarm platform, your workload clusters come with default autoscaling functionality. Today, it's supported by {{/*% autoscaling_supported_versions*/%}}, but our goal is to bring this feature to all supported providers.

The cluster autoscaler runs in the workload cluster and is responsible for scaling the number of nodes in the cluster. The configuration though is managed in the management cluster though. The autoscaling controller has a default configuration for the [cluster-autoscaler addon](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). To configure the `cluster-autoscaler` further, you need to access the platform API. [Learn how to access the platform API]({{< relref "/getting-started/access-to-platform-api" >}}).

To extend the configuration, you need to override these defaults using a `ConfigMap` with the convention name `cluster-autoscaler-user-values`.

## Where is the user values ConfigMap

The following examples assume the cluster you are trying to configure has an id of `myclustername`.

You will find the `ConfigMap` named `myclustername-cluster-autoscaler-user-values` in the organization namespace of your cluster:

```text
$ kubectl -n org-company get cm myclustername-cluster-autoscaler-user-values
NAME DATA AGE
myclustername-cluster-autoscaler-user-values 0 11m
```

## How to set configuration options using the user values ConfigMap

On the platform API, create or edit a ConfigMap named `myclustername-cluster-autoscaler-user-values`
in the workload cluster namespace:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: cluster-autoscaler
name: myclustername-cluster-autoscaler-user-values
namespace: myorg
data:
values: |
configmap:
scaleDownUtilizationThreshold: 0.30
```

## Configuration reference

The following sections explain some of the configuration options and what their defaults are. They show only the `data` field of the ConfigMap for brevity.

The most recent source of truth for these values can be found in the [values.yaml](https://github.com/giantswarm/cluster-autoscaler-app/blob/v1.30.3-gs1/helm/cluster-autoscaler-app/values.yaml) file of the `cluster-autoscaler-app`.

### Scale down utilization threshold

The `scaleDownUtilizationThreshold` defines the proportion between requested resources and capacity. Once utilization drops below this value, cluster autoscaler will consider a node as removable.

Our default value is 70%, which means in order to scale down, one of the nodes has to have less utilization (CPU/memory) than this threshold. You can adjust this value to your needs as shown below:

```yaml
data:
values: |
configmap:
scaleDownUtilizationThreshold: 0.65
```

### Scan interval

Defines what interval is used to review the state for taking a decision to scale up/down. Our default value is 10 seconds.

```yaml
data:
values: |
configmap:
scanInterval: "100s"
```

### Skip system pods

By default, the cluster autoscaler will never delete nodes which run pods of the `kube-system` namespace (except `daemonset` pods). This rule can be deactivated by setting the following property to false.

```yaml
data:
values: |
configmap:
skipNodesWithSystemPods: "false"
```

### Skip pods with local storage

The cluster autoscaler by default deletes nodes with pods using local storage (`hostPath` or `emptyDir`). In case you want to protect these nodes from removal, you can to set the following property to true.

```yaml
data:
values: |
configmap:
skipNodesWithLocalStorage: "true"
```

### Balance similar node groups

The cluster autoscaler by default doesn't differentiate between node groups when scaling. In case you want to enable considering node groups, you need to set the following property to true.

```yaml
data:
values: |
configmap:
balanceSimilarNodeGroups: "true"
```

Read [the Kubernetes autoscaler FAQ](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md) to learn more about the cluster autoscaler and its configuration options.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AWS
Loading