EKS
Fully managed Kubernetes control plane(master). Meaning
- AWS manages master nodes.
- necessary apps pre installed e.g
- container runtime
- master processes etc
- it takes care of scaling and backups
we create and worry about worker nodes only.
Amazon EKS is a managed service that makes it easy for us to use Kubernetes on AWS without needing to install and operate your own Kubernetes control plane.
EKS workflow
ECS vs EKS vs Fargate
Kubernetes/ k8s installation options
Steps:
install kubectl
https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
install AWS CLI
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Configure AWS CLI
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
- generate Access keys (access key ID and secret access key)
create cluster
- permission for IAM role for cluster
- AmazonEKSClusterPolicy
here i am using default VPC and subnets. in production create custom. use private subnets. for load balancer etc. use public subnet.
networking add on - leave defaults
leave logging off as it incurrs too much charge
check if cluster is up
aws eks --region us-east-1 describe-cluster --name gouravk8s01 --query cluster.status
update kubeconfig
aws eks --region us-east-1 update-kubeconfig --name gouravk8s01
if having problem :
// Start with fresh file rm ~/.kube/config
validate kubectl configuration to master node
kubectl get svc
Now add node group
- permissions for IAM for node group(EC2)
- AmazonEC2ContainerRegistryReadOnly
- AmazonEKSWorkerNodePolicy
- AmazonEKS_CNI_Policy
validate worker node status
kubectl get nodes --watch
if deletion is taking too long..the node group could have dependency attached to it that needs to be delete first like security groups, ENI(elastic network interface) etc.
Note:Â It's normal for your cluster to take time to delete. You aren't charged for a cluster that is in the DELETING state.