Skip to main content

Set up Kubernetes cluster on AWS EKS

This page provides steps to set up a Kubernetes Cluster with the persistent volume on Amazon Elastic Kubernetes Service (EKS).

Prerequisites

  1. Install eksctl. For installation instructions, see the official eksctl documentation for instructions.

  2. Install awscli. For installation instructions, see the official awscli documentation.

  3. Use the following command to verify whether you can access information related to your account and ARN. This verification confirms that you can connect to and access your Amazon account using the CLI.

    aws sts get-caller-identity

Create and configure cluster

Follow these steps to create a KubeConfig and define a storage class that automatically generates a persistent volume during installation of Appsmith.

  1. Create cluster with:

    eksctl create cluster --name <CLUSTER_NAME> --region <REGION_NAME> --node-type t2.2xlarge

    In the above command, replace:

    • <REGION_NAME>: with the region where you'll host the Kubernetes cluster.
    • <CLUSTER_NAME>: with the name of the cluster.
  2. Create KubeConfig with:

    aws eks update-kubeconfig --region <REGION_NAME> --name <CLUSTER_NAME>  --profile <PROFILE_NAME>

    In the above command, replace:

    • <REGION_NAME>: with the region where the Kubernetes cluster is hosted.
    • <CLUSTER_NAME>: with the name of the cluster.
    • <PROFILE_NAME>: the profile name that has access to the AWS EKS cluster to the --profile parameter.
  3. Test your Kubernetes configuration with:

    kubectl cluster-info

    The above command provides a summary of the current cluster configuration, including the Kubernetes master and other cluster information.

  4. Define a storage class. Follow these instructions for your Kubernetes version:

    To define a storage class, execute the following command:

    kubectl apply -f - <<EOF
    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
    name: gp2
    provisioner: kubernetes.io/aws-ebs
    EOF
  5. Add AmazonEC2FullAccess policy to the cluster and the node group.

  6. Mark the gp2 class as default with:

    kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}

Next steps

Troubleshooting

If you are facing issues contact the support team using the chat widget at the bottom right of this page.