This content originally appeared on DEV Community and was authored by Shivani Patel
set up and deploy a scalable Kubernetes cluster on AWS using EKS, allowing for the efficient deployment of containerized applications.
1. Create a VPC Along with Subnet, Route Table, and Internet Gateway
Begin by creating a custom Virtual Private Cloud (VPC).
Set up subnets, route tables, and internet gateways for network traffic management within the VPC.
2. Create IAM Roles
Create two IAM roles:
One for the EKS cluster.
Another for EC2 nodes (worker nodes).
**
- Create the EKS Cluster** Navigate to the EKS dashboard and create a cluster. Assign the name and role to the cluster, and AWS will provision it automatically. Under network settings, select private subnets and keep other settings at default. Once created, the EKS cluster will be running, and you can observe the creation of the two pods.
**
- Create a Node Group** Create a node group for the cluster. Select the instance type (e.g., t2.micro) and configure the scaling parameters (e.g., desired size: 1, minimum size: 1, maximum size: 1). After successful creation, three worker pods will be available.
5. Install AWS CLI and Minikube
Download AWS CLI and Minikube.
Check their versions and configure AWS CLI using your access keys.
Update the EKS cluster and deploy the necessary configurations using deployment.yaml.
Verify that pods are running and the deployment is created (e.g., deployment-2048).
6. Manage Tags
Edit public subnets and add tags.
Assign an Elastic Load Balancer (ELB) role by adding relevant tags.
Copy the cluster URL for future use.
**
- Configure IAM Identity Provider** Go to the IAM Identity Provider section in the AWS Management Console. Paste the cluster URL and set the audience to sts.amazon.com.
8. Create Policies Through JSON
Create a policy via a JSON file for the Load Balancer Controller.
Name the policy and modify the custom trust policy by adding the necessary account and role details.
Attach the generated ARN URL to the service YAML file and apply the ingress.yaml to complete the setup.
9. Set Up the Load Balancer
Once the load balancer is created, copy its DNS name.
Open a browser and paste the DNS name to confirm that your application (e.g., a sample 2048 game) has been successfully deployed.
This content originally appeared on DEV Community and was authored by Shivani Patel
Shivani Patel | Sciencx (2024-10-17T21:25:51+00:00) AWS EKS CLUSTER. Retrieved from https://www.scien.cx/2024/10/17/aws-eks-cluster/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.