Skip to main content

Onboarding your EKS clusters to Compute Copilot for EKS Karpenter

Why use Compute Copilot EKS?

Learn more about how Compute Copilot for EKS can help you to put your EKS cost optimization on auto-pilot here.

Pre-requisites:

  1. You must be logged in to your nOps account.
  2. Your AWS account must be configured to your nOps account.
  3. You must have Kubernetes cluster with Karpenter installed.

About Compute Copilot for EKS:

Karpenter offers significant advancements in intelligent scaling, cluster awareness, and customization. However, it is often tuned as a one-and-done — whereas your ecosystem and market pricing are constantly changing. 

That’s where Compute Copilot for EKS comes in, constantly tuning your configuration for the best price and availability on autopilot. It allows engineering teams to take advantage of Karpenter’s more effective and granular scaling functionalities, for a fraction of the effort. 

Compute Copilot for EKS ensures you are scheduled on the most cost-optimized and stable option at every moment — automatically updating your provisioning on the fly if not for 50+% EKS savings.

Why Compute Copilot for EKS over legacy Cluster Autoscaler:

Optimizing your AWS costs is a key challenge today. Spot can be cheaper, but terminations pose the threat of outages to your critical workloads. RIs and Savings Plans require risky, long-term commitment and can lead to paying for capacity you don’t need.

Compute Copilot for EKS continuously rightsizes, reconsiders, and re-evaluates your workload placement to available RIs, SPs, or Spot to maximize your savings on autopilot with complete reliability. It is aware of your entire dynamic AWS ecosystem and market pricing in real time. 

Compute Copilot for EKS even covers your commitments with a 100% money-back guarantee. If your usage changes, you change instance regions, or even leave the cloud, we buy back those commitments from you. You get all the cost savings of commitments, with all the flexibility of on-demand. In contrast, Cluster Autoscaler requires much more of your time and labor, lacks Karpenter’s advanced autoscaling automation, and makes you choose between cost savings and flexibility.

Steps to Configure Your EKS Cluster for Cost Optimization and Savings

Run the Cloudformation to Establish the necessary roles and permissions:

  1. Navigate to EKS from top menu Compute Copilot.
  2. Click on the EKS cluster you want to cost-optimize.
  3. Redirect to Cluster Configuration Section.
  4. Generate API key from API key section and save it for further use.
  5. Click on Setup button and continue
  6. You should be redirected to the Cloudformation stack.
  7. Fill the saved API key in the field Token.
  8. Run the Cloudformation stack and return to nOps platform.
  9. On successful CF run , Version and Status should be displayed as : Configured.

Install nOps Agent:

  1. On the same Cluster Configuration page , generate a new API key for nOps Agent.
  2. Copy the custom command and run it in your command line.
  3. Test Connectivity of nOps Agent in the Compute Copilot for EKS Dashboard.

Create EC2NodeClass:

EC2NodeClass can be created in two ways:

  1. Auto Configuration

    • For the selected EKS cluster, Select create a NodeClass on Configuration page.

    • Assign a unique name to it.

    • Choose the AMI Family from the dropdown menu.

    • Add Subnet IDs manually or with Search by tags.

    • Add Security Group IDs manually or with Search by tags.

    • For EC2NodeClass, you have to select the IAM Role to be used. In case you're not seeing the desired role in the list, you can manually insert your role name.

    • Configure Metadata Options with user data to give commands after node starts [optional].

    • Create Device Mapping by providing necessary details [optional].

    • Click on Create Automatically and nodeclass will be created.

      note

      you can create multiple node templates

  2. Manual Configuration

    • For the selected EKS cluster, select create a EC2NodeClass.

    • Insert the YAML code and validate it. Make sure you specify an unique name under metadata.name property for your resource

    • Now select Create manually.

      note

      In the NodeClasses list you can find resources created without nOps if there are any. These are going to be shown without the nOps icons and will be available only in Yaml format in View Mode. When creating NodePools, you can select any NodeClass as reference, either created via nOps or directly created in the cluster by you or your team.

Create NodePool:

NodePool can be created in Three ways:

  1. Import Your NodePool

    Import your Node Pools, and nOps will handle the rest. Once you import, you can make any changes to the Node Pools in your code repository and they will automatically sync with nOps. This eliminates manual overhead and facilitates centralized management, ensuring your configurations are always in sync and optimized to prioritize performance.

  • To import Node Pools, simply click the Import Nodepool button on the Cluster Configuration page. This will instantly create an nOps copy linked to the original version and send it for deployment into your cluster.

  1. Auto Configuration

    • For the selected EKS cluster, select create NodePool.

    • Assign a unique NodePool name.

    • Select the created EC2NodeClass to pull configuration from.

    • Select Availability Zones.

    • Select Capacity Type — Spot, On Demand or both [recommended to select both]

    • You have the option to select Max Limit of vCPUs & Memory. Using 0 in both fields will indicate Karpenter to apply no limits when allocating resources.

    • Create Taints and Labels if required [for specific provisioner service].

    • For instance selection section, you have the option to filter the types by Architecture, Generation, Accelerator details, Networking, Storage and others. After the filtering is done, you can click Select All Eligible Instance Families for autoselection.

    • Set the weight (optional)

    • Now select Create Automatically.

      note

      You can create multiple NodePools, but each NodePool will have only 1 Node class.

  2. Manual Configuration

    • For the selected EKS cluster, select create NodePool.
    • Insert the YAML code and validate it. Make sure you specify an unique name under metadata.name property for your resource and also add the correct reference to the desired NodeClass under spec.template.spec.nodeClassRef.
    • Now select Create manually.

Test Connectivity

Once the NodePool is created, the user can again Test Connectivity to confirm that the EKS cluster is configured correctly.

As soon as cluster status displays Configured, Compute Copilot for EKS will start its magic to generate savings on the connected EKS cluster.

FAQ

  1. Is Karpenter mandatory to install EKS Compute Copilot?
    • Yes, currently EKS Compute Copilot works only if the clusters are being managed by Karpenter. We do have Cluster Autoscaler in our roadmap but it is not available as of now.
  2. Do EKS Compute Copilot Karpenter NodePools take precedence over my own Karpenter NodePools?
    • Yes. Once onboarded to Compute Copilot, the NodePools already existing in the cluster are not going to be used anymore. But you don’t necessarily need to delete them. It’s just that they will not be used while Compute Copilot NodePools are there. Note: It may not always be true depending on the existing NodePools configuration.
  3. Can we import the YAML for existing node class and NodePools to configure Compute Copilot EKS NodePools?
    • Yes. That is absolutely possible and is shown in the above document within the “Manual Config” steps. By clicking on Manual Config, you can just copy-paste your existing YAML templates to configure nOps Karpenter provisioner
  4. Does nOps provide DevOps support to customers migrating from cluster autoscaler to Karpenter?
    • nOps has experienced engineers who provide free of cost support to all clients to help them with Karpenter migration. You can get as much on-call support as you need to review your Karpenter settings. We also conduct monthly “Karpenter Office Hours” with our existing customer audience to build a community where we can share our experience, customers can ask questions in an open forum, see hands-on to some basic Karpenter implementation practices and much more. However, nOps is not a Service company and therefore, we do not take responsibility for your migration project or provide dedicated DevOps resources or do managed services. Our support is limited to only providing guidance and reviews. Note: If you want a recording of the most recent “Karpenter Office Hours” then please drop us an email on ‘support@nops.io’.
  5. Does nOps Compute Copilot for EKS support configuration of Multiple NodePools while setting up nOps Karpenter provisioner?
    • Yes, absolutely. Setting up multiple NodePools is a very common thing that customers ask for and we have made it very user friendly to configure that. You get two options to do it, configure in the UI using Auto Config or configure via existing YAML template import using Manual Config method.
  6. I have multiple applications running on the clusters which have different instance requirements, can Compute Copilot support different instance types in such cases?
    • Yes, Compute Copilot does allow you to pick & choose only those instance types that you’d want nOps Karpenter provisioner to provision.
  7. Is it possible to set minimum threshold values for metrics like CPU and Memory while configuring my Karpenter provisioner in Compute Copilot?
    • Yes, we allow users to set the minimum CPU and Memory metrics
  8. Can I put my Stateful workloads on EKS Compute Copilot?
    • EKS Compute Copilot does not come with any limitation on Stateful workloads. However, we do not recommend putting Stateful Workloads on Spot Instances if they are running mission critical operations.
  9. How can I identify resources managed by Compute Copilot EKS?
    • Compute Copilot EKS adds a common tag to all resources it manages. This is accomplished by automatically adding a tag in the spec.tags section of AWSNodeTemplates. The value of the tag is nops:nks:enabled=true and it will appear on all EC2 managed by Compute Copilot EKS.