Skip to main content

High Availability on AWS EKS (K8s)

High availability ensures that your Appsmith instance remains accessible without interruption, even during system disruptions. This page outlines the steps required to set up high availability for your Appsmith installation on Amazon Elastic Kubernetes Service (EKS).

Prerequisites

Before setting up high availability for Appsmith on AWS EKS, ensure the following requirements are met:

  1. You need to have Appsmith Commercial Edition installed on a Kubernetes cluster. If you have not installed Appsmith yet, follow the Kubernetes installation guide. This guide assumes you are working with an existing installation.

  2. Ensure you have the following tools installed and configured to interact with your Kubernetes cluster:

  3. High availability requires distributing workloads across multiple nodes to avoid a single point of failure. Ensure you have a running Kubernetes cluster with more than one node.

  4. Verify that you have at least 2 GB of free storage available to perform backup and update tasks.

  5. You must have an active Amazon Web Services (AWS) account with permissions to access and manage the following services:

    • Amazon Elastic Kubernetes Service (EKS)
    • Amazon Elastic File System (EFS)
    • Identity and Access Management (IAM)
  6. Create a backup of your existing Appsmith instance to safeguard your data. For more information, see How to back up your Appsmith instance.

Configure high availability

To ensure Appsmith is highly available, follow the steps below to configure AWS EKS and your Appsmith instance.

Configure AWS EKS

Follow these steps to configure AWS EKS:

  1. The metrics server provides metrics to the Horizontal Pod Autoscaler (HPA) for scaling pods. Install the metrics server with:

    kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
  2. Configure EFS and Persistent Volume Claims (PVC) for your cluster:

    • To enable your cluster to interact with EFS, create an IAM role. For more information, see the Creating an IAM role guide.

    • The Amazon EFS CSI driver mounts EFS volumes to your pods. Follow the instructions in the Installing the Amazon EFS CSI driver guide to install the EFS CSI Driver.

    • Create the EFS File System. For more information, see the Create an Amazon EFS file system for Amazon EKS guide.

    • Use one of the following options to configure PVCs in the values.yaml file:

      • Create a new Persistent Volume Claim

        existingClaim:
        enabled: false
        name:
        claimName:
        efs:
        enabled: true
        driver: efs.csi.aws.com
        volumeHandle: FILE_SYSTEM_ID
      • Reuse an existing Persistent Volume Claim
        Update the values.yaml file:

        existingClaim:
        enabled: true
        name: efsappsmith
        claimName: efsappsmith
        efs:
        enabled: true
        driver: efs.csi.aws.com
        volumeHandle: FILE_SYSTEM_ID

Configure Appsmith instance

Follow these steps to configure the Appsmith instance:

  1. Open the values.yaml file in the Appsmith installation directory and enable autoscaling:

    autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 2
  2. Apply the high availability configuration using Helm. If the values.yaml file is not in the deployment directory, specify its location with the -f flag.

    helm upgrade -i appsmith-ee appsmith-ee/appsmith -n appsmith-ee -f values.yaml

If you already have an external MongoDB and Redis setup or wish to configure external instances, you can do so. For detailed instructions, refer to the Set up External MongoDB and Set up External Redis guides.

  1. Check the status of the pods:

    kubectl get pods -n appsmith-ee

    Once the process completes, the pod status should show as RUNNING.

Troubleshooting

If you encounter errors, roll back to a previous version. See the Restore instance guide for more information. If you continue facing issues, contact support using the chat widget available in the bottom-right corner of this page.

See also

  • Expose K8s to the Internet: Follow this guide to expose your Kubernetes-hosted Appsmith instance to the internet, enabling external access.
  • Restore Appsmith instance: Follow this guide to restore your Appsmith instance from a backup, ensuring minimal downtime and data loss.
  • SAML Single Sign-On: Learn how to configure SAML-based Single Sign-On (SSO) for secure authentication in your Appsmith instance.