Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Create multiple node groups for EKS worker nodes using eksctl

by | Sep 3, 2021

Wondering how to create multiple node groups for EKS worker nodes using eksctl? We can help you with this!

As a part of our AWS Support Services, we often receive similar requests from our AWS customers.

Today, let’s see the steps followed by our Support Techs to help our customers by using eksctl to create multiple node groups for EKS worker nodes.

 

Create multiple node groups for EKS worker nodes using eksctl

 
We can create a worker node group using eksctl with default parameters or with custom parameters using a configuration file.
 

With default parameters

 
Let’s see the steps to create a worker node group using eksctl with default parameters:

  1. Firstly, we need to install eksctl.

2. Then using the below command we can confirm that eksctl is installed on the terminal with the required permissions:

$ eksctl version

3. Now we shoul run the following command to create an additional worker node group with default parameters:

$ eksctl create nodegroup --cluster=yourClusterName --name=yourNodeGroupName --region yourRegionName

The default parameters are:

Instance type = m5.large
AMI : lastest AWS EKS AMI
Nodes-desired capacity = 2
Nodes-min capacity =2
Nodes-max capacity=2

New node groups inherit the version of Kubernetes installed, however we specify a different version of Kubernetes. Also run the –version=latest command for using the latest version of Kubernetes.

4. Now login to the AWS management console and open AWS CloudFormation console.

5. Then select the stack associated with the node group that we created.

6. Select the Events tab to see for an AWS CloudFormation event showing that our stack is deployed.

7. Now we should run the following command to confirm that the new worker node groups are attached to the cluster. Also, we can verify that the node group configuration is applied using the same command.

$ Kubectl get nodes
$ eksctl get nodegroups --cluster yourClusterName

 

With custom parameters

 
Let’s see the steps to create a worker node group using eksctl with custom parameters:

  1. Firstly, we must define the parameters for the new worker node group in a configuration file.

For example:

kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5
metadata:
name: yourClusterName
region: yourRegionName
nodeGroups:
- name: ng1-Workers
availabilityZones: ["az-name"]
desiredCapacity: 3
instanceType: m5.large
iam:
instanceProfileARN: "arn:aws:iam::11111:instance-profile/eks-nodes-base-role" #Attaching IAM role
instanceRoleARN: "arn:aws:iam::1111:role/eks-nodes-base-role"
privateNetworking: true
securityGroups:
withShared: true
withLocal: true
attachIDs: ['sg-11111', 'sg-11112']
ssh:
publicKeyName: 'my-instance-key'
kubeletExtraConfig:
kubeReserved:
cpu: "300m"
memory: "300Mi"
ephemeral-storage: "1Gi"
kubeReservedCgroup: "/kube-reserved"
systemReserved:
cpu: "300m"
memory: "300Mi"
ephemeral-storage: "1Gi"
tags:
'environment': 'development'
- name: ng-2-builders #example of a nodegroup that uses 50% spot instances and 50% on demand instances:
minSize: 2
maxSize: 5
instancesDistribution:
maxPrice: 0.017
instanceTypes: ["t3.small", "t3.medium"] # At least two instance types should be specified
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 50
spotInstancePools: 2
tags:
'environment': 'production'

2. Then run the following command to create an additional worker node group using the configuration file.

$ eksctl create nodegroup –config-file= yourConfigFileName

3. Now login to the AWS management console and open AWS CloudFormation console.

4. Then select the stack associated with the node group that we created.

5. Select the Events tab to see for an AWS CloudFormation event showing that our stack is deployed.

6. Now we should run the following command to confirm that the new worker node groups are attached to the cluster. Also, we can verify that the node group configuration is applied using the same command.

$ kubectl get nodes
$ eksctl get nodegroups --cluster yourClusterName

Now we can see that the worker nodes have joined the cluster.

[Need help with more AWS queries? We’d be happy to assist]
 

Conclusion

 
To conclude, today we discussed the steps followed by our Support Engineers to help our customers to create multiple node groups for EKS worker nodes using eksctl.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF