Kubernetes
Setup Cluster
AWS-EKS
Eksclustersetup

EKS-Cluster-Ready

Create a New Cluster from UI

  1. Go to the EKS Console
  2. Refer to the EKS IAM Service Role Documentation (opens in a new tab) for creating the necessary service roles.

EKS Cluster Role

Refer to EKS Cluster Role Documentation (opens in a new tab) for detailed instructions.

Cluster Trust Policy

Create a file named cluster-trust-policy.json with the following content:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "eks.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

Attach the EKS Cluster Policy to the role:

aws iam attach-role-policy \
--policy-arn arn:aws:iam::aws:policy/AmazonEKSClusterPolicy \
--role-name eksClusterRole

EKS Node Role

Refer to EKS Node Role Documentation (opens in a new tab) for detailed instructions.

Add EKS Node Group

When adding the EKS node group, if you encounter network issues, apply the Weave network configuration:

kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml

Install AWS CLI and Add Credentials

  1. Install the AWS CLI and configure your credentials.

Install Kubectl Tools in CloudShell

Run the following commands to install kubectl:

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Connect to the EKS Cluster

Update your kubeconfig to connect to the EKS cluster:

aws eks update-kubeconfig --name <cluster-name>

Verify the connection:

kubectl cluster-info
kubectl get pods

🧙 AI Wizard - Instant Page Insights

Click the button below to analyze this page.
Get an AI-generated summary and key insights in seconds.
Powered by Perplexity AI!