Skip to Content

Node Classes (Beta)
Available in v1.17.0+

Node Classes are only supported on AWS EKS clusters and are not available for Azure AKS clusters.

Overview

Node classes are a fundamental concept in Karpenter that allow you to define and manage different types of nodes based on their characteristics and capabilities. They provide a blueprint for the infrastructure that Karpenter will provision to meet your workload demands.

ScaleOps Dashboard enables you to create, view, and edit Node Classes with an intuitive interface, helping you optimize your cluster configuration without manual YAML editing.

Creating a New Node Class

To create a new node class, navigate to the Node Classes page and click the “Create Node Class” button.

Node Classes

When you click the create button, you’ll see a dialog where you need to enter a unique name for your new node class.

Node Class Create

After entering the name, you’ll proceed to configure the various settings for your node class using the sections described below.

Key Configuration Areas

Instance Tags

EC2 Instances provisioned by Karpenter (for a given EKS cluster) will automatically be tagged by EKS and Karpenter - such as the “aws:eks:cluster-name” tag. Node Class definition can include additional tags - e.g., associating the EC2 instances with a particular part of your organization.

Node Class Tags

IAM Roles

As part of Karpenter installation, you need to define an IAM Role for Karpenter Nodes (which will be assigned to respective EC2 Instance Profiles).

Your Node Class definition should include this IAM Role name, which typically follows the convention KarpenterNodeRole-${CLUSTER_NAME}.

You can view or modify the IAM Role definition associated with your Node Class in the “Role” section of the Node Class page:

Node Class Role

Refer to the Karpenter installation documentation for details on required permissions for this role.

Role and Network

When defining a Node Class, you must specify Subnets and Security Groups that will be attached to new nodes as they are provisioned by Karpenter. These would typically match the configuration of the existing EC2 instances in your cluster (e.g., previously managed by the Kubernetes Cluster Autoscaler).

You can locate these details as follows:

  1. Open the AWS Console and find a representative node in your cluster (under the “Compute” tab, “Nodes” section).

Nodes

  1. Click on the node to open the node details page, and from there open the respective EC2 Instance page (click on the instance Id under “Instance” in the Node overview table).

EC2 Instance

  1. The EC2 instances will usually be part of an Auto Scaling Group that holds all the details we need (e.g., provisioned by eksctl or Terraform). Open the Auto Scaling Group page. Note the Security Groups and the Subnets associated with the ASG.

ASG Details

The required Security Groups and Subnets must be specified as part of the Node Class definition in the Network section of the Node Class page in the ScaleOps Dashboard. You can either specify the IDs explicitly or (recommended) add a special tag to them (by clicking on each resource and adding a tag under the “Tags” tab), and refer to them indirectly via the tag in the Node Class definition. The latter is the recommended practice - e.g., using a tag specific to a particular cluster: "karpenter.sh/discovery": "Your-Cluster-Name".

Node Class Network

Note that while Security Groups are typically common for all nodes in a node pool (or even cluster), Subnets are specific to a particular Availability Zone. Therefore, it is not enough to include Subnets associated with a single instance.

Refer to the Karpenter installation documentation for more examples on tagging relevant Subnets and Security Groups.

Storage

You can optionally specify storage configurations for EC2 instances in your Node Class, such as EBS-backed disks with specific settings that will be provisioned and attached to each node.

This is configured through the blockDeviceMappings definition in the Node Class specification, which you can manage directly from ScaleOps Dashboard in the “Storage” section:

Node Class Storage

Image

Beyond hardware, network, and storage configuration, you can customize the software stack installed on your nodes by selecting a particular AMI. The AMI can be selected explicitly, by a label selector, or by alias. This is optional, as Karpenter will automatically use the default AMI that includes a standard EKS node software stack.

You can view or modify the AMI and the User Data associated with your Node Class in the “Image” section of the Node Class page:

Node Class Image

Advanced Configuration

Node Class configuration can include Kubelet settings that Karpenter will automatically inject into each provisioned node. A common parameter to customize is the maximum number of Pods allowed on a node, which overrides the defaults calculated by Kubelet based on instance configuration. Another parameter which might require configuration is the address of the DNS server, in case you are using your own.

Moreover, when there is a need to customize the node behavior beyond Kubelet configuration, it is possible to override the User Data passed to the EC2 Instance on started.

You can view or modify the Kubelet configuration and the User Data associated with your Node Class in the “Advanced” section:

Node Class Advanced