Configure High Availability and Scalability
The high availability and scalability features of Kubernetes ensure continuous access to your applications. This page shows how to set up high availability and scalability for Appsmith.
Prerequisites
- A self-hosted Appsmith Commercial Edition installation on a Kubernetes cluster. If not installed yet, see the Kubernetes installation guide for installing Appsmith.
- A running Kubernetes cluster with more than one node to achieve high availability.
- At least 2 GB of free storage space for backup and update tasks.
Before you begin
- Create a backup of the Appsmith instance, See Backup instance guide.
- Install a metrics server that provides vital metrics to the Horizontal Pod Autoscaler (HPA) to scale the pods with:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
-
Configure your Kubernetes cluster with Amazon Elastic File System (EFS) and set up the Persistent Volume Claim (PVC),follow these steps:
a. To create an IAM role to interact with the Amazon Elastic File System (EFS), see Creating an IAM role guide.
b. Amazon EFS Container Storage Interface (CSI) driver is a plugin for Kubernetes that allows you to mount Amazon Elastic File System (EFS) on your Kubernetes pods. To install the Amazon EFS CSI driver, see Installing the Amazon EFS CSI driver guide.
c. To create the EFS file system, see Create an Amazon EFS file system for Amazon EKS guide.
d. To configured the Persistent Volume Claim (PVC) for the Kubernetes cluster, follow these steps:
- Create a New Persistent Volume Claim - Create a new PVC and update the
values.yaml
file as shown below:
existingClaim:
enabled: false
name:
claimName:
efs:
enabled: true
driver: efs.csi.aws.com
volumeHandle: FILE_SYSTEM_ID- Reuse an Existing Persistent Volume Claim - If you already have a PVC that you want to reuse for EFS or if you have multiple deployments/pods needing access to the same EFS volume, update the
values.yaml
file as shown below:
existingClaim:
enabled: true
name: efsappsmith
claimName: efsappsmith
efs:
enabled: true
driver: efs.csi.aws.com
volumeHandle: FILE_SYSTEM_ID - Create a New Persistent Volume Claim - Create a new PVC and update the
Configure instance
- Go to the Appsmith installation directory, open
values.yaml
file, and turn on autoscaling by changing theenabled
attribute totrue
for autoscaling attribute.
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 2
- Update the Appsmith installation with high availability configuration with:
helm upgrade -i appsmith-ee appsmith-ee/appsmith -n appsmith-ee -f values.yaml
If the values.yaml
file is not in the deployment directory specify the file location in the -f
attribute.
- Verify the pod status with:
kubectl get pods -n appsmith-ee
The above command displays the status of the pods. Once the process is completed, the pod status is shown as RUNNING.
Troubleshooting
If you see errors, you can roll back to a previous version to fix the issue. For more information, see the Restore instance section.
If you continue to face issues, contact the support team using the chat widget at the bottom right of this page.