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 an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

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!