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

Update cluster autoscaler addon documentation for newly added flags #1714

Merged

Conversation

archups
Copy link
Contributor

@archups archups commented Jul 22, 2024

This PR is related to kubermatic/kubeone#3305 and kubermatic/kubeone#3306 changes for KubeOne.
Also added documentation for the customization of KKP Autoscaler addon.

…ption

Signed-off-by: archups <archupsawant@gmail.com>
@kubermatic-bot kubermatic-bot added the dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. label Jul 22, 2024
@archups archups self-assigned this Jul 22, 2024
@kubermatic-bot kubermatic-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 22, 2024
@xmudrii
Copy link
Member

xmudrii commented Jul 22, 2024

/hold
This change is not available in 1.8 yet

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 22, 2024
Comment on lines 49 to 83
To find out how to override embedded add-ons, please check the [Addons document][embedded-addons].

If you are facing issue similar to the one described over [here][enforce-node-group-min-size] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE` to the cluster autoscaler addon as shown below:

```yaml
apiVersion: kubeone.k8c.io/v1beta2
kind: KubeOneCluster
versions:
kubernetes: '1.29.4' ## kubernetes version
cloudProvider: ## This field is sourced automatically if terraform is used for the cluster
aws: {}
addons:
enable: true
addons:
- name: cluster-autoscaler
params:
CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE: "true"
```

If you are facing issue similar to the one described over [here][balance-similar-node-groups] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_BALANCE_SIMILAR_NODE_GROUP` to the cluster autoscaler addon as shown below:

```yaml
apiVersion: kubeone.k8c.io/v1beta2
kind: KubeOneCluster
versions:
kubernetes: '1.29.4' ## kubernetes version
cloudProvider: ## This field is sourced automatically if terraform is used for the cluster
aws: {}
addons:
enable: true
addons:
- name: cluster-autoscaler
params:
CLUSTER_AUTOSCALER_BALANCE_SIMILAR_NODE_GROUP: "true"
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this in the step 1 instead, in an information or a warning block? This step is more about modifying the cluster-autoscaler itself (i.e. YAML manifests), but this is more about additionally configuring the cluster-autoscaler addon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

Comment on lines 251 to 252
[enforce-node-group-min-size]: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#my-cluster-is-below-minimum--above-maximum-number-of-nodes-but-ca-did-not-fix-that-why
[balance-similar-node-groups]: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#im-running-cluster-with-nodes-in-multiple-zones-for-ha-purposes-is-that-supported-by-cluster-autoscaler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead use permalinks here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

To find out how to override embedded add-ons, please check the [Addons document][embedded-addons]. For more information regarding available configuration parameters and options, please check the [Cluster Autoscaler FAQ][ca-faq].
To find out how to override embedded add-ons, please check the [Addons document][embedded-addons].

If you are facing issue similar to the one described over [here][enforce-node-group-min-size] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE` to the cluster autoscaler addon as shown below:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are facing issue similar to the one described over [here][enforce-node-group-min-size] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE` to the cluster autoscaler addon as shown below:
If you're facing an issue where your [cluster is below the minimum or above the maximum number of nodes, but the cluster-autoscaler is not fixing it][ca-faq], you need to pass down the `CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE` parameter to the cluster-autoscaler addon as shown below:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

CLUSTER_AUTOSCALER_ENFORCE_NODE_GROUP_MIN_SIZE: "true"
```

If you are facing issue similar to the one described over [here][balance-similar-node-groups] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_BALANCE_SIMILAR_NODE_GROUP` to the cluster autoscaler addon as shown below:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are facing issue similar to the one described over [here][balance-similar-node-groups] in the [Cluster Autoscaler FAQ][ca-faq], pass down the param `CLUSTER_AUTOSCALER_BALANCE_SIMILAR_NODE_GROUP` to the cluster autoscaler addon as shown below:
If you're running a cluster with nodes in the multiple zones for the HA purposes, consider setting the `CLUSTER_AUTOSCALER_BALANCE_SIMILAR_NODE_GROUP` parameter to `true` as shown below. For more information about this parameter, check the [Cluster Autoscaler FAQ][balance-similar-node-groups].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, to make it easier to follow the document, maybe we should provide just one YAML example with both arguments set, eventually with a comment that you can remove the parameter that you don't need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Once it has been deleted, you can check the cluster to ensure that the cluster autoscaler has been deleted using the command `kubectl get pods -n kube-system`.


## Customize KKP Autoscaler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for the KubeOne document, I'd recommend using permalinks here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!


## Customize KKP Autoscaler

You can customize the cluster autoscaler addon in order to override the cluster autoscaler deployment definition to set or pass the required flag(s) by following the instructions provided over [here](https://docs.kubermatic.com/kubermatic/v2.25/architecture/concept/kkp-concepts/addons/#custom-addons), if you are facing any of the below mentioned issues as described in the [cluster autoscaler FAQs](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like this:

Suggested change
You can customize the cluster autoscaler addon in order to override the cluster autoscaler deployment definition to set or pass the required flag(s) by following the instructions provided over [here](https://docs.kubermatic.com/kubermatic/v2.25/architecture/concept/kkp-concepts/addons/#custom-addons), if you are facing any of the below mentioned issues as described in the [cluster autoscaler FAQs](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md):
You can customize the cluster autoscaler addon in order to override the cluster autoscaler deployment definition to set or pass the required flag(s) by following the instructions provided [in the Addons document](https://docs.kubermatic.com/kubermatic/v2.25/architecture/concept/kkp-concepts/addons/#custom-addons).
### Suggestions and Known Issues
Some of [the know issues in the cluster-autoscaler](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md) can be mitigated by adjusting the cluster-autoscaler deployment to pass additional flags, for example:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please use ref to access other KKP documents, such as {{< ref "../../architecture/concept/kkp-concepts/addons/#custom-addons" >}} (I didn't test this URL, please make sure to test it and fix it if needed).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 24, 2024
Signed-off-by: archups <archupsawant@gmail.com>
@archups archups force-pushed the update-cluster-autoscaler-docs branch from d84de37 to f30d6da Compare July 24, 2024 18:32
@archups archups requested a review from xmudrii July 24, 2024 18:36
@xmudrii
Copy link
Member

xmudrii commented Jul 24, 2024

KubeOne part LGTM, @embik do you want to take care of the KKP part?
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9fb50e767f1e789ab5df72d591ec070d46b801cf

Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 25, 2024
@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 25, 2024
@kubermatic-bot kubermatic-bot merged commit 2424472 into kubermatic:main Jul 25, 2024
11 checks passed
@archups archups deleted the update-cluster-autoscaler-docs branch July 25, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants