# Creating a Node Pool

Nodepool can be added to AWS EKS cluster at the time of cluster creation or to an existing EKS cluster.

gopaddle supports 2 different types of nodepools :

(a) Managed - Uses EKS AMIs and standard nodepool supported by AWS

(b) Custom - Supports Custom AMI. For example, you can choose an ubuntu custom AMI from [here](https://cloud-images.ubuntu.com/docs/aws/eks/) based on the region and cluster version that you choose to provider.

### Common Attributes : <a href="#h_3958a419e6" id="h_3958a419e6"></a>

* AWS Key - All the AWS private keys available within the selected region will be listed. If no keys are available, then create a new private Key in AWS console before adding a node pool. To create a private key, follow the AWS documentation on [Amazon EC2 key pairs.](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
* Disk Size - Minimum disk size in GB
* Min Nodes - Minimum Number of nodes in the node pool.
* Max Nodes - Maximum Number of nodes in the node pool.
* Desired Size - The desired number of nodes to be created while creating the node pool. Desired size must be within the min and max node counts.\
  Node Type (GPU) - Choose GPU for compute intensive workloads like Deep Learning.
* AMI Type - Available type is AL2\_x86\_64, AL2\_x86\_64\_GPU and AL2\_ARM\_64. Only when GPU node type is selected, AL2\_x86\_64\_GPU type will be available.
* Availability Zone - One or more availability zones where the nodes within the nodepool needs to be provisioned.

{% tabs %}
{% tab title="Managed Node Pool" %}
Fill the common attributes required to create a node pool and add the node pool to the cluster.

<figure><img src="/files/1WgySJq8uXmIK1sVFVIr" alt=""><figcaption></figcaption></figure>

Create a new node pool role and enter the nodepool role ARN before adding the node pool. Check the Role ARN reference [here](https://app.gitbook.com/o/kaNNkk5MWdImsh5Ur4MO/s/5QxXxCob5M5VXQJTryRc/~/changes/7/provision-multi-cloud-clusters/provision-clusters-on-cloud/aws-eks/adding-an-aws-iam-role-eks-master-node-pool) for more information.

Once the nodepool is provisioned, AWS sets a label *"eks.amazonaws.com/nodegroup:\<nodepoolname>"* to group the nodes within the nodepool and identify their readiness. These labels can be used as nodeSelectors at the time of deploying workloads to this node pool. When an autoscaling event occurs, new nodes are labeled with nodepool name as well.
{% endtab %}

{% tab title="Custom Node Pool" %}
When custom node pool type is chosen, provide the custom AMI to be used while creating the node pool.

<figure><img src="/files/wyXAQWoyzgueKDreTBhl" alt=""><figcaption></figcaption></figure>

Create a new node pool role and enter the nodepool role ARN before adding the node pool. Check the Role ARN reference [here](https://app.gitbook.com/o/kaNNkk5MWdImsh5Ur4MO/s/5QxXxCob5M5VXQJTryRc/~/changes/7/provision-multi-cloud-clusters/provision-clusters-on-cloud/aws-eks/adding-an-aws-iam-role-eks-master-node-pool) for more information. gopaddle uses Cloud Formation Template (CFT) to provision the custom node pool. You can check the Stack Log section for the CFT logs for further debugging.

Once the nodepool is provisioned, gopaddle sets 2 labels *"nodePoolName:\<nodepoolname>"* and "nodePoolType:customNodePool" to group the nodes within the nodepool and identify their readiness. These labels can be used as nodeSelectors at the time of deploying workloads to this node pool. When an autoscaling event occurs, new nodes are labeled with nodepool name as well.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.gopaddle.io/overview/provision-new-cluster/provision-clusters-on-cloud/aws-eks/creating-a-node-pool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
