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:
- You must be logged in to your nOps account.
- Your AWS account must be configured to your nOps account.
- 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:
- Navigate to EKS from top menu Compute Copilot.
- Click on the EKS cluster you want to cost-optimize.
- Redirect to Cluster Configuration Section.
- Generate API key from API key section and save it for further use.
- Click on Setup button and continue
- You should be redirected to the Cloudformation stack.
- Fill the saved API key in the field Token.
- Run the Cloudformation stack and return to nOps platform.
- On successful CF run , Version and Status should be displayed as : Configured.
Install nOps Agent:
- On the same Cluster Configuration page , generate a new API key for nOps Agent.
- Copy the custom command and run it in your command line.
- Test Connectivity of nOps Agent in the Compute Copilot for EKS Dashboard.
Create EC2NodeClass:
EC2NodeClass can be created in two ways:
-
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.
noteyou can create multiple node templates
-
-
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.
noteIn 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:
-
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.
-
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.
noteYou can create multiple NodePools, but each NodePool will have only 1 Node class.
-
-
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
- 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.
- 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.
- 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
- 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’.
- 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.
- 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.
- 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
- 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.
- 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 isnops:nks:enabled=true
and it will appear on all EC2 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