EKS-Cluster-Ready
Create a New Cluster from UI
- Go to the EKS Console
- 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
- 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