Skip to main content

Kubernetes

Installing Appsmith using Helm Charts

This chart bootstraps an Appsmith deployment on a Kubernetes cluster using Helm package manager.

Prerequisites

note

By default, the ingress controller will not have data compression enabled. You can enable it by following the steps listed in the Nginx ingress controller compression section.

Installing the Chart

  1. Add Appsmith into your repository using Helm.
helm repo add appsmith https://helm.appsmith.com

helm repo update

2. Install the chart with the appsmith release.

helm install appsmith/appsmith --generate-name

The command deploys the Appsmith application on the Kubernetes cluster in the default configuration. The Parameters section lists the configurable parameters during installation.

Uninstalling the Chart

To uninstall the appsmith release:

helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
appsmith-1631069261 default 1 2021-09-09 11:24:40.152766 +0700 +07 deployed appsmith-1.3.0 1.16.0

helm uninstall appsmith-1631069261

The command uninstalls the release and removes all Kubernetes resources associated with the chart.

Parameters

Global parameters

NameDescriptionValue
global.namespaceOverrideOverride the namespace for resource deployed by the chart""
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
fullnameOverrideString to fully override appsmith.name template""
containerNameSpecify container's name running in the pods"appsmith"
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}

Appsmith Image parameters

NameDescriptionValue
image.registryAppsmith image registryindex.docker.io
image.repositoryAppsmith image repositoryappsmith/appsmith-editor
image.tagAppsmith image taglatest
image.pullPolicyAppsmith image pull policyIfNotPresent

Appsmith deployment parameters

NameDescriptionValue
strategyTypeAppsmith deployment strategy typeRollingUpdate
schedulerNameAlternate scheduler""
podAnnotationsAnnotations for Appsmith pods{}
podSecurityContextAppsmith pods security context{}
securityContextSet security context{}
resources.limitsThe resources limits for the Appsmith container{}
resources.requestsThe requested resources for the Appsmith container{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity fod pod assignment{}

Appsmith namespace parameters

NameDescriptionValue
namespace.createEnable creation of Namespacetrue

Appsmith service account parameters

NameDescriptionValue
serviceAccount.createEnable creation of ServiceAccount for Appsmith podstrue
serviceAccount.nameName of the created ServiceAccount . If not set, a name is generated using the appsmith.fullname template""
serviceAccount.annotationsAdditional service account annotations{}

Traffic Exposure Parameters

NameDescriptionValue
service.typeAppsmith service typeClusterIP
service.portAppsmith service port80
service.portNameAppsmith service port nameappsmith
service.nodePortAppsmith service node port to expose to expose8000
service.clusterIPAppsmith service Cluster""
service.loadBalancerIPAppsmith service Load Balancer IP""
service.loadBalancerSourceRangesAppsmith service Load Balancer sources[]
service.annotationsAdditional custom annotations for Appsmith service{}
ingress.enabledEnable ingress record generation for Appsmithfalse
ingress.hostsAn array of hosts to be covered with the ingress record[]
ingress.tlsEnable TLS configuration for the hosts defined at ingress.hosts parameterfalse
ingress.secretsCustom TLS certificates as secrets[]
ingress.certManagerEnable ingress to use TLS certificates provided by Cert Managerfalse
ingress.certManagerTlsSpecify TLS secret resources created by Cert Manager[]
ingress.classNameConfigure Ingress class that being used in ingress resource""

Persistence parameters

NameDescriptionValue
persistence.enabledEnable persistence using Persistent Volume Claimstrue
persistence.storageClassPersistent Volume storage class""
persistence.annotationsAdditional custom annotations for the PVC{}
persistence.localStorageEnable persistent volume using local storagefalse
persistence.storagePathLocal storage path/tmp/hostpath_pv
persistence.localClusterLocal running cluster to provide storage space[minikube]
persistence.accessModesPersistent Volume access modes[ReadWriteOnce]
persistence.sizePersistent Volume size10Gi
storageClass.enabledEnable Storage Class configurationfalse
storageClass.defaultClassCreate default Storage Classfalse
storageClass.bindingModeBinding mode for Persistent Volume Claims using Storage ClassImmediate
storageClass.allowVolumeExpansionAllow expansion of Persistent Volume Claims using Storage Classtrue
storageClass.reclaimPolicyConfigure the retention of the dynamically created Persistent VolumeDelete
storageClass.provisionerStorage Class provisioner""
storageClass.annotationsAdditional storage class annotations{}
storageClass.mountOptionsMount options used by Persistent Volumes{}
storageClass.parametersStorage Class parameters{}

Auto-update chart's image

NameDescriptionValue
autoupdate.enabledEnable auto update Helm chart's imagetrue
autoupdate.schedulerSchedule time to run cron job to update image"0 * * * *"

Specify each parameter using --set key=value[,key=value] argument to helm install. For example:

helm install \
--set persistence.storageClass=appsmith-pv \
stable-appsmith/appsmith --generate-name

The above command deploys the Appsmith application and configures the application to use the storage class nameappsmith-pv.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

helm install -f values.yaml stable-appsmith/appsmith --generate-name

Tip: You can use the default values.yaml as a starting point for configuring this way.

Appsmith configuration

To change Appsmith configurations, you can update the values.yaml file (the available configurations are listed below).

NameValue
applicationConfig.APPSMITH_OAUTH2_GOOGLE_CLIENT_ID""
applicationConfig.APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET""
applicationConfig.APPSMITH_OAUTH2_GITHUB_CLIENT_ID""
applicationConfig.APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET""
applicationConfig.APPSMITH_CLIENT_LOG_LEVEL""
applicationConfig.APPSMITH_GOOGLE_MAPS_API_KEY""
applicationConfig.APPSMITH_MAIL_ENABLED""
applicationConfig.APPSMITH_MAIL_HOST""
applicationConfig.APPSMITH_MAIL_PORT""
applicationConfig.APPSMITH_MAIL_USERNAME""
applicationConfig.APPSMITH_MAIL_PASSWORD""
applicationConfig.APPSMITH_MAIL_FROM""
applicationConfig.APPSMITH_REPLY_TO""
applicationConfig.APPSMITH_MAIL_SMTP_AUTH""
applicationConfig.APPSMITH_MAIL_SMTP_TLS_ENABLED""
applicationConfig.APPSMITH_DISABLE_TELEMETRY""
applicationConfig.APPSMITH_RECAPTCHA_SITE_KEY""
applicationConfig.APPSMITH_RECAPTCHA_SECRET_KEY""
applicationConfig.APPSMITH_RECAPTCHA_ENABLED""
applicationConfig.APPSMITH_MONGODB_URI""
applicationConfig.APPSMITH_REDIS_URL""
applicationConfig.APPSMITH_ENCRYPTION_PASSWORD""
applicationConfig.APPSMITH_ENCRYPTION_SALT""
applicationConfig.APPSMITH_CUSTOM_DOMAIN""

For example, to change the encryption salt configuration, you can run the following command:

helm install \
--set applicationConfig.APPSMITH_ENCRYPTION_SALT=123 \
stable-appsmith/appsmith --generate-name

Expose Appsmith

  • If you wish to publish your Appsmith to the world through the Internet, you will need to setup the Ingress controller firstly. Please refer to the section Kubernetes NGINX Ingress Controller in the Prerequisites.

  • In case of you have not install the Helm chart yet, you can run the below command to install it with exposing Appsmith:

    helm install appsmith/appsmith --generate-name \
    --set ingress.enabled=true \
    --set ingress.annotations."kubernetes\.io/ingress\.class"=nginx \
    --set service.type=ClusterIP
  • If you have installed Appsmith Helm chart, please run the helm upgrade command to upgrade the existing installation

    helm upgrade --set ingress.enabled=true appsmith appsmith/appsmith

    # Or this command if you are using values.yaml file
    helm upgrade --values values.yaml appsmith appsmith/appsmith

Updating Appsmith

Auto Update

  • In the default Appsmith helm installation the auto-update is disabled (Recommended). You have the option to enable auto-update for your Appsmith helm deployment by either:

    • Setting autoupdate.enabled to true in the values.yaml file, if you are using the values file.
     helm upgrade --values values.yaml appsmith appsmith/appsmith
    • By passing the argument --set autoupdate.enabled=true to the helm install/upgrade command.
      helm install appsmith/appsmith --generate-name \
    --set ingress.enabled=true \
    --set ingress.annotations."kubernetes\.io/ingress\.class"=nginx \
    --set service.type=ClusterIP \
    --set autoupdate.enabled=true

Manual Update

  • To manually update the Appsmith container image to the latest release, run the command: kubectl rollout restart statefulset appsmith

Nginx ingress controller compression (Gzip)

In the default installation, the Nginx ingress controller will not have the data compression configured. Please follow the following steps to enable it.

  • Edit the configMap for ingress-nginx-controller by using the below command
kubectl edit configmap -n ingress-nginx ingress-nginx-controller
  • Add the following to the data section.\
```yaml
data: # ADD IF NOT PRESENT
use-gzip: "true" # ENABLE GZIP COMPRESSION
gzip-types: "*" # SPECIFY MIME TYPES TO COMPRESS ("*" FOR ALL)
```
note

The Nginx controller will automatically update after saving (:wq!) the above changes.

Troubleshooting

If you encounter any errors during this process, check out our guide on debugging deployment errors. If you are still facing any issues, please reach out to support@appsmith.com or join our Discord Server to speak to the Appsmith team directly!

Further Reading