AWS, Cloud Computing, DevOps

3 Mins Read

Boosting Cluster Performance with Self-Managed Nodes in Amazon EKS

Voiced by Amazon Polly

Introduction

Amazon Elastic Kubernetes Service (EKS) offers flexibility in managing worker nodes through managed and self-managed node groups. In this guide, we will walk through creating and configuring a self-managed node group with custom max_pods settings, which can be crucial for optimizing resource utilization and cluster performance.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Prerequisites

  • AWS CLI configured with appropriate permissions
  • kubectl installed and configured
  • eksctl installed
  • An existing EKS cluster
  • AWS Systems Manager Parameter Store access

Understanding max_pods

Before we dive in, it’s important to understand what max_pods means in the context of Kubernetes:

  • max_pods determines the maximum number of pods that can run on a single node
  • The default value varies based on the instance type
  • Setting an appropriate max_pods value is crucial for:
    • Network performance
    • Resource utilization
    • Cluster stability

Creating a Self-Managed Node Group

Step 1: Get Cluster Information

  • First, we need to retrieve the cluster information that will be used in our bootstrap script:
    bash:

Step 2: Create Node AWS IAM Role
bash:

Step 3: Create a Launch Template

Create a launch template that includes our custom max_pods configuration. Note how we explicitly set max_pods in both bootstrap.sh and kubelet arguments:
bash:

Step 4: Create Auto Scaling Group
bash:

Step 5: Enable Nodes to Join the Cluster

Create the node authentication ConfigMap to allow nodes to join the cluster:
bash:

Verifying the Configuration

After deployment, verify your node group configuration:

Best Practices

  1. Instance Type Selection
    • Choose instance types based on your workload requirements
    • Consider CPU, memory, and networking requirements
  2. max_pods Calculation
    • Use Amazon’s formula: (Number of ENIs × (IPv4 addresses per ENI – 1)) + 2
    • Consider the network interface limits of your instance type
  3. Monitoring and Scaling
    • Set up Amazon CloudWatch alarms for node metrics
    • Implement horizontal pod autoscaling
    • Monitor pod scheduling failures

Conclusion

Self-managed node groups provide greater control over your Amazon EKS worker nodes. By carefully configuring max_pods and following best practices, you can optimize your cluster’s performance and resource utilization.

Remember to monitor your cluster’s behavior and adjust settings based on your specific workload requirements.

Drop a query if you have any questions regarding Amazon EKS and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFrontAmazon OpenSearchAWS DMS and many more.

FAQs

1. Can I modify max_pods after the node group is created?

ANS: – You cannot modify max_pods for existing nodes. You will need to:

  1. Create a new launch template version with updated max_pods
  2. Update your Auto Scaling Group to use the new template version
  3. Gradually replace old nodes with new ones

2. How does max_pods affect cluster autoscaling?

ANS: – max_pods influences how the cluster autoscaler makes scaling decisions by:

  • Determining the maximum pod capacity per node
  • Affecting when new nodes are added based on pending pods
  • Impacting resource utilization calculations

WRITTEN BY Aditi Agarwal

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!