Start EKS kubernetes with eksctl
Pritam Khergade
??IT Entrepreneur ?? Senior DevOps Engineer ??Cloud Wrangler ??| DevOps Mastermind ?? : Kubernetes, ?? Docker, Terraform, ??AWS, Azure, GCP and more!
Lets start with our AWS EKS cluster creation,
Prerequisites
Before starting this tutorial, you must install and configure the following tools and resources that you need to create and manage an Amazon EKS cluster.
aws sts get-caller-identity
Step 1: Create your Amazon EKS cluster and nodes
Create your Amazon EKS cluster with the following command. You can replace my-cluster with your own value. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 100 characters. Replace region-code with any AWS Region that is supported by Amazon EKS. For a list of AWS Regions:
eksctl create cluster --name my-cluster --region=us-east-2 --node-type=t2.medium --nodes=2
eksctl created a kubectl config file in ~/.kube or added the new cluster's configuration within an existing config file in ~/.kube on your computer.
After cluster creation is complete, view the AWS CloudFormation stack named eksctl-my-cluster-cluster in the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation to see all of the resources that were created.
领英推荐
Step 2: View Kubernetes resources
kubectl get nodes
kubectl get all -A
Step 3: Delete your cluster and nodes
After you've finished with the cluster and nodes that you created for this tutorial, you should clean up by deleting the cluster and nodes with the following command
eksctl delete cluster --name my-cluster --region=us-east-2
Conclusion
In conclusion, using this steps we will able to create cluster and if you want to do clean up we can use step 3.