Create & Manage Cluster Kubernetes Using EKS
What is AWS ?
Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 200 fully featured services from data centers globally. Millions of customers — including the fastest-growing startups, largest enterprises, and leading government agencies are using AWS to lower costs, become more agile, and innovate faster.
What is EKS?
Amazon EKS is a managed service that helps make it easier to run Kubernetes on AWS. Through EKS, organizations can run Kubernetes without installing and operating a Kubernetes control plane or worker nodes. Simply put, EKS is a managed containers-as-a-service (CaaS) that drastically simplifies Kubernetes deployment on AWS.
Lets try build a cluster on aws platfrom:
Topologi:
What should we prepare?
- IAM role for eks cluster & node group eks
- VPC & subnet for node group eks
- Security group for eks & node group
- Key pair, if you need access to your cluster from public ip
Guide
- Create Iam role for eks cluster & node group eks
Go to IAM Dashboard, and then create IAM Role for eks & node group eks
Next, we will create a iam role for eks node group. Let’s goo…
Same like before, but in step attach permission policies we just need to add the above policies
- VPC & subnet for worker node EKS
Here list of default subnet from aws,
Az-A : 172.31.16.0/20
Az-B : 172.31.32.0/20
- Create EKS Cluster
Wait until the cluster has been created.
- Access your cluster
export AWS_ACCESS_KEY_ID="xxxx"
export AWS_SECRET_ACCESS_KEY="xxx"aws eks update-kubeconfig --region {region} --name {eks name}kubectl config use-context {cluster arn}kubectl get nodes -A
kubectl get pods -A
- Create Node Group for EKS Cluster
Wait until the node group is created.
Check current status node & pods on cluster
- Lets start, deploy wordpress using helm
helm repo add stable https://charts.helm.sh/stable
helm install stable/wordpress --generate-name
- Check or access wordpress using chrome
If you have a question about this topic, you can dm me.
Thanks