Create EKS Cluster
Create EKS Cluster
- To create EKS cluster, we will first have to generate SSH key to be able to access EC2 Node in the Cluster as needed:
aws ec2 create-key-pair --key-name k8s-demo --query 'KeyMaterial' --output text> k8s-demo.pem
- In the AWS Console interface
- In EC2 interface
- Select Key Pair
- View Key Pair just created
- To create EKS Cluster and EC2 Nodes we use the following command:
eksctl create cluster --name k8s-demo --region ap-southeast-1 --nodegroup-name k8s-demo --nodes 2 --ssh-access --ssh-public-key k8s-demo --managed
- When you run this command, eksctl will use AWS CloudFormation to create the necessary infrastructure and setup Master Node (Control Plane).
- Interface after creating EKS Cluster.
It takes about 15 minutes to complete the initialization of EKS Cluster