Skip to content

Commit

Permalink
Merge pull request #512 from Qovery/feat/add_karpenter_tips
Browse files Browse the repository at this point in the history
add karpenter node affinity tips
  • Loading branch information
jul-dan authored Jan 22, 2025
2 parents 2f05938 + 1dfa2b7 commit 204b2c6
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_on: "2024-11-27"
last_modified_on: "2025-01-22"
title: "AWS EKS with Karpenter"
description: "Learn how to configure your AWS Kubernetes clusters with Karpenter on Qovery"
---
Expand Down Expand Up @@ -309,10 +309,39 @@ The `Features` tab in your cluster settings allows you to check if the [**Static

The `Network` tab in your cluster settings allows you to update your Qovery VPC route table so that you can perform VPC peering. For step-by-step guidelines on how to set up VPC peering, [see our dedicated tutorial](https://hub.qovery.com/guides/tutorial/aws-vpc-peering-with-qovery/).

### Defining cluster node constraints to run your Services

#### Define if your service can run on a on-demand instance

When using spot instances in your cluster, you may want to ensure that certain critical services, such as databases or essential applications, are always deployed on on-demand instances.

To specify that a service should be deployed on an `on-demand` instance, manually set the `deployment.affinity.node.required` advanced setting to:

```json
{"karpenter.sh/capacity-type":"on-demand"}
```

#### Define the instance type to run your service

In some cases, you may need to ensure that a specific service runs on a particular instance type to meet performance, compliance, or cost requirements.

For example, to assign a service to the t3a.xlarge instance type, manually set the `deployment.affinity.node.required` advanced setting to:

```json
{"node.kubernetes.io/instance-type": "t3a.xlarge"}
```

<Alert type="info">

The specified instance type must be included in the list of instance types defined in the [NodePool configuration][docs.using-qovery.configuration.clusters.aws-with-karpenter#resources].

</Alert>


[docs.getting-started.install-qovery.aws.cluster-managed-by-qovery.quickstart#attach-aws-credentials]: /docs/getting-started/install-qovery/aws/cluster-managed-by-qovery/quickstart/#attach-aws-credentials
[docs.using-qovery.configuration.clusters#logs]: /docs/using-qovery/configuration/clusters/#logs
[docs.using-qovery.configuration.clusters#updating-a-cluster]: /docs/using-qovery/configuration/clusters/#updating-a-cluster
[docs.using-qovery.configuration.clusters#what-are-the-different-instance-types-available-when-creating-a-cluster]: /docs/using-qovery/configuration/clusters/#what-are-the-different-instance-types-available-when-creating-a-cluster
[docs.using-qovery.configuration.clusters.aws-with-karpenter#resources]: /docs/using-qovery/configuration/clusters/aws-with-karpenter/#resources
[docs.using-qovery.deployment.image-mirroring]: /docs/using-qovery/deployment/image-mirroring/
[urls.qovery_console]: https://console.qovery.com
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,32 @@ The `Features` tab in your cluster settings allows you to check if the [**Static

#### Network

The `Network` tab in your cluster settings allows you to update your Qovery VPC route table so that you can perform VPC peering. For step-by-step guidelines on how to set up VPC peering, [see our dedicated tutorial](https://hub.qovery.com/guides/tutorial/aws-vpc-peering-with-qovery/).
The `Network` tab in your cluster settings allows you to update your Qovery VPC route table so that you can perform VPC peering. For step-by-step guidelines on how to set up VPC peering, [see our dedicated tutorial](https://hub.qovery.com/guides/tutorial/aws-vpc-peering-with-qovery/).

### Defining cluster node constraints to run your Services

#### Define if your service can run on a on-demand instance

When using spot instances in your cluster, you may want to ensure that certain critical services, such as databases or essential applications, are always deployed on on-demand instances.

To specify that a service should be deployed on an `on-demand` instance, manually set the `deployment.affinity.node.required` advanced setting to:

```json
{"karpenter.sh/capacity-type":"on-demand"}
```

#### Define the instance type to run your service

In some cases, you may need to ensure that a specific service runs on a particular instance type to meet performance, compliance, or cost requirements.

For example, to assign a service to the t3a.xlarge instance type, manually set the `deployment.affinity.node.required` advanced setting to:

```json
{"node.kubernetes.io/instance-type": "t3a.xlarge"}
```

<Alert type="info">

The specified instance type must be included in the list of instance types defined in the [NodePool configuration][docs.using-qovery.configuration.clusters.aws-with-karpenter#resources].

</Alert>

0 comments on commit 204b2c6

Please sign in to comment.