Closed slysunkin closed 1 month ago
kubectl
: CLI installed locally.AWS
: Ensure you have the AWS CLI installed and configured with the necessary IAM permissions.eksctl
: Install eksctl by following the official guide.eksctl create cluster \
--name my-eks-cluster \
--region us-east-2 \
--nodegroup-name my-nodes \
--node-type t3.medium \
--nodes 3 \
--nodes-min 1 \
--nodes-max 4 \
--managed
--name: The name of your EKS cluster. --region: AWS region where you want to create the cluster. --nodegroup-name: The name of the node group. --node-type: EC2 instance type for the nodes. --nodes: Number of nodes to create initially. --nodes-min and --nodes-max: Minimum and maximum number of nodes. --managed: Indicates the use of managed node groups.
After the creation process completes, verify that your EKS cluster is running:
eksctl get cluster --region us-east-2
You should see your cluster listed with the status ACTIVE.
Ensure that your kubeconfig is updated to connect to the new cluster:
aws eks --region us-east-2 update-kubeconfig --name my-eks-cluster
This allows kubectl to communicate with your EKS cluster.
Run a command to see if you can interact with the cluster:
kubectl get nodes
You should see the list of nodes in your EKS cluster.
Deploy a Kubernetes Application: You can now deploy applications using standard kubectl commands. Configure Cluster Autoscaler: To automatically adjust the size of your cluster based on resource utilization, configure the Kubernetes Cluster Autoscaler.
To delete the EKS cluster and associated resources:
eksctl delete cluster --name my-eks-cluster --region us-east-2
This will remove the cluster and the EC2 instances associated with it.
Create: https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-create.html
Get password: https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html
Example:
aws ecr get-login-password \
--region <region> \
| docker login \
--username AWS \
--password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
Create and configure EKS (Elastic Kubernetes Service) cluster for development and testing
Acceptance criteria