Set Up Kubernetes Cluster on AWS EKS
This page provides step-by-step instructions to provision a Kubernetes cluster on Amazon Elastic Kubernetes Service (EKS) for deploying Nected.
Read the official AWS EKS Setup Guide, to read the steps in more detail.
Prerequisites
Before setting up your Kubernetes cluster, ensure you've installed:
eksctl: See the official eksctl documentation for installation steps.
awscli: See the official AWS CLI documentation for installation steps.
Verify your AWS CLI configuration and connectivity by running:
aws sts get-caller-identity
This command confirms your AWS account details and ensures your CLI configuration is correctly set.
Create and Configure the EKS Cluster
Follow these steps to create a Kubernetes cluster on AWS EKS for your Nected deployment:
Step 1: Create an EKS Cluster
Run the following command using eksctl
to provision your cluster:
eksctl create cluster --name <CLUSTER_NAME> --region <REGION_NAME> --node-type t2.2xlarge
Replace placeholders as follows:
<CLUSTER_NAME>
Name for your Kubernetes cluster
nected-prod
<REGION_NAME>
AWS Region where your cluster will reside
us-west-2
Step 2: Generate KubeConfig File
To connect to your newly created cluster, generate the KubeConfig file by running:
aws eks update-kubeconfig --region <REGION_NAME> --name <CLUSTER_NAME> --profile <PROFILE_NAME>
Replace placeholders as follows:
<REGION_NAME>
AWS Region of your EKS cluster
us-west-2
<CLUSTER_NAME>
Name of your EKS cluster
nected-prod
<PROFILE_NAME>
AWS CLI profile configured with access to EKS
default
Step 3: Verify Cluster Configuration
Confirm your Kubernetes cluster connection:
kubectl cluster-info
This command displays essential details of your Kubernetes cluster, confirming successful setup.
Define a Storage Class for Persistent Volumes
Nected requires persistent storage. Create a default storage class using Amazon EBS (gp2
) with the following steps.
Execute the following command in your terminal:
kubectl apply -f - <<EOF
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: gp2
provisioner: kubernetes.io/aws-ebs
EOF
Set this storage class as the default for your Kubernetes cluster:
kubectl patch storageclass gp2 \\
-p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Step 4: Attach IAM Policy for EBS Access
Ensure your cluster nodes have the required IAM policy (AmazonEC2FullAccess
) to manage EBS volumes:
Open your AWS IAM Console.
Navigate to your cluster’s IAM roles (for both cluster and node group).
Attach the
AmazonEC2FullAccess
policy to these roles.
This policy is essential for provisioning persistent storage dynamically.
Next Steps
With your AWS EKS Kubernetes cluster configured, you are now ready to deploy Nected:
Last updated