- shivani singh
- August 25, 2021
Steps to Create Amazon EKS node group on Amazon web Service (AWS)
Kubernetes is an open-source service. Basically it is used for automation deployment,& containerized applications management. It is also Known as K8s. First, we can create a Amazon EKS cluster. Amazon cluster provides to create a numbers of nodes. We can create one or more nodes into a node group. Node group is a one or more Amazon EC2 instances.
There are some steps to create Amazon EKS node group:
Step 1: Login to Amazon Web service portal.
Step 2: First create a Amazon EKS cluster Follow this post for how to create EKS cluster. https://www.hackerxone.com/2021/08/20/13-steps-guide-to-create-kubernetes-cluster-on-amazon-web-serviceaws/
Step 3: Click on Created EKS cluster name.
Step 4: Click on Compute & Click on Add Node group.
Step 5: Provide a name for node group.
Step 6: Create a IAM Role for Node group.Click on IAM console.
- Click on Create Role.
- Select AWS service.
- Click on EC2.
- Click on Next:Permission.
- Search & Select the following policies: AmazonEKSWorkerNodePolicy , AmazonEC2ContainerRegistryReadOnly.
- Click on Next Tags.
- Provide the key name & value for IAM role.
- Click on Next Review.
- Provide the Role name.
- Click on Create role.
Step 7: Now,select the created IAM role for Node group.
Step 8: We have another option to create node group using Launch tamplate & we can Add Kubernetes Labels & Taints.Kubernetes Labels is a key/value pairs.It is used for identify Kubernetes objects.Taints is used for allow a node to repel a set of pods.
- Provide a key name & value for node group.
- Click on Next.
Step 9: Next is Node group compute configuration.Select AMI type,Capacity type & Instance type.
- Provide a Disk size in GB.
- We can configure the auto-scaling on Node group.Provide the min & max number of instances(Node group).
- Provide a number or Percentage of unavailable nodes to be tolerated during node group updation.
- Click on Next.
Step 10: Select the existing Subnets.
- Enable the SSH access to nodes.
- Click on Enable.
- Select the existing SSH Key Pairs.
- Select the existing Security Group or Allow the SSH access to All.
- Click on Next.
Step 11: Review the configurations.
- Click on Create.
- Now, Node Group is Creating.
Create Kubernetes Cluster Node group using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Configure the aws using aws configure command then provide Access,Secret key,region & default output format.
- Install eksctl on system so click on link https://www.hackerxone.com/?p=2848&preview=true how to install eksctl on ubuntu.
- Run the following command to craete node group.
# Create Public Node Group
eksctl create nodegroup –cluster=cluster-name \
–region=us-east-1 \
–name=node-group-name \
–node-type=t3.medium \
–nodes=2 \
–nodes-min=2 \
–nodes-max=4 \
–node-volume-size=20 \
–ssh-access \
–ssh-public-key=ssh-key-pair-name \
–managed \
–asg-access \
–external-dns-access \
–full-ecr-access \
–appmesh-access \
–alb-ingress-access
# List NodeGroups
eksctl get nodegroup –cluster=<clusterName>
# List Nodes
kubectl get nodes -o wide