Create an Amazon EKS Cluster
Create an Amazon EKS Cluster
Create an EKS Cluster
Create an EKS cluster with managed worker nodes and OIDC enabled:
eksctl create cluster \
--name ${CLUSTER_NAME} \
--region ${AWS_REGION} \
--nodes 2 \
--node-type t3.large \
--with-oidcConfigure kubectl Access
Update kubeconfig to point to the new cluster:
aws eks update-kubeconfig \
--name ${CLUSTER_NAME} \
--region ${AWS_REGION}Verify cluster connectivity and node readiness:
kubectl get nodesIf no worker nodes are present, create a managed node group manually:
eksctl create nodegroup \
--cluster ${CLUSTER_NAME} \
--region ${AWS_REGION} \
--name ng-${CLUSTER_NAME} \
--nodes 2 \
--node-type t3.largeIf nodes fail with CNI plugin not initialized error, install/update the VPC CNI add-on:
Check existing add-ons:
aws eks list-addons \
--cluster-name ${CLUSTER_NAME} \
--region ${AWS_REGION}Install or update the VPC CNI add-on:
aws eks create-addon \
--cluster-name ${CLUSTER_NAME} \
--addon-name vpc-cni \
--region ${AWS_REGION}Or, if already installed:
aws eks update-addon \
--cluster-name ${CLUSTER_NAME} \
--addon-name vpc-cni \
--region ${AWS_REGION} \
--resolve-conflicts OVERWRITEAfter updating the CNI, delete the failed node group and recreate it:
eksctl delete nodegroup --cluster ${CLUSTER_NAME} --name ng-${CLUSTER_NAME} --region ${AWS_REGION}
eksctl create nodegroup \
--cluster ${CLUSTER_NAME} \
--region ${AWS_REGION} \
--name ng-${CLUSTER_NAME} \
--nodes 2 \
--node-type t3.largeInstall Essential EKS Add-ons
Ensure the core EKS add-ons required for networking and DNS are installed.
List existing add-ons:
aws eks list-addons \
--cluster-name ${CLUSTER_NAME} \
--region ${AWS_REGION}Install CoreDNS:
aws eks create-addon \
--cluster-name ${CLUSTER_NAME} \
--addon-name coredns \
--region ${AWS_REGION}Install kube-proxy:
aws eks create-addon \
--cluster-name ${CLUSTER_NAME} \
--addon-name kube-proxy \
--region ${AWS_REGION}Verify System Components
Confirm all system pods are running:
kubectl get pods -n kube-systemYou should see aws-node, coredns, and kube-proxy pods running.