Also support feature for generating SSL certificate for domain when deploying on Kubernetes Co-authored-by: GEEK Up Team <prj_legodevops@geekup.vn> |
||
|---|---|---|
| .. | ||
| scripts | ||
| templates | ||
| install.k8s.sh | ||
| README.md | ||
| description |
|---|
| Appsmith stands for speed and getting started with Appsmith is just as fast. |
Getting started
You can begin using appsmith via our cloud instance or by deploying appsmith yourself
- Using Appsmith Cloud
recommended: Create a new application with just one click - Using Docker: Deploy anywhere using docker
Appsmith Cloud
The fastest way to get started with appsmith is using our cloud-hosted version. It's as easy as
Prerequisites
- Ensure
kubectlis installed and configured to connect to your cluster-
Install kubeclt: kubernetes.io/vi/docs/tasks/tools/install-kubectl/
-
Minikube: Setup Kubectl
-
Google Cloud Kubernetes: Configuring cluster access for kubectl
-
Aws EKS: Create a kubeconfig for Amazon EKS
-
Microk8s: Working with kubectl
-
- Kubernetes NGINX Ingress Controller must be enable on your cluster by default. Please make sure that you install the right version for your cluster
- Minikube: Set up Ingress on Minikube with the NGINX Ingress Controller
- Google Cloud Kubernetes: Ingress with NGINX controller on Google Kubernetes Engine
- AWS EKS: Install NGINX Controller for AWS EKS
- Microk8s: Add on: Ingress
- Script tested on Minikube with Kubernetes v1.18.0
Kubernetes
Appsmith also comes with an installation script that will help you configure Appsmith & deploy your app on Kubernetes cluster.
- Fetch the install.k8s.sh script on the system you want to deploy appsmith
# Downloads install.sh
curl -O https://raw.githubusercontent.com/appsmithorg/appsmith/master/deploy/k8s/install.k8s.sh
- Make the script executable
chmod +x install.k8s.sh
- Run the script.
./install.k8s.sh
- Check if all the pods are running correctly.
kubectl get pods
#Output should look like this
NAME READY STATUS RESTARTS AGE
appsmith-editor-cbf5956c4-2zxlz 1/1 Running 0 4m26s
appsmith-internal-server-d5d555dbc-qddmb. 1/1 Running 2 4m22s
imago-1602817200-g28b2 1/1 Running 0 4m39s
mongo-statefulset-0 1/1 Running 0 4m13s
redis-statefulset-0 1/1 Running 0 4m00s
- Custom Appsmith's Configuration
- After you successfully run the script, all the configuration files have been downloaded and & stored into
<Installation Path> - If you want to update your app settings (ex: database host). Go to the
<Installation Path>/config-template, update the corresponding value in the configmap file, then restart the pods. - Below steps will help you update database hostname of your application:
- Open file
appsmith-configmap.yamlin<Installation Path>/config-templatefolder - Update the value of variable
APPSMITH_MONGODB_URIto your database host name - Run commands:
- Open file
kubectl apply -f appsmith-configmap.yaml
kubectl scale deployment appsmith-internal-server --replicas=0
kubectl scale deployment appsmith-internal-server --replicas=1
{% hint style="success" %}
- You can access the running application on the Ingress Endpoint if you not chose to provide custom domain for your application .
kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
appsmith-ingress <none> * XXX.XXX.XX.XXX 80 2m
- You may need to wait 2-3 minutes before accessing the application to allow application start (depends on your cluster). {% endhint %}
Custom Domains
To host Appsmith on a custom domain, you can contact your domain registrar and update your DNS records. Most domain registrars have documentation on how you can do this yourself.
{% hint style="warning" %}
- During the setup of Ingress Controller on your cloud. You will need to map your custom domain with the External IP of the controller before running the installation script
- Below is an example how to achieve the External IP of NGINX Ingress Controller
➜ kubectl get svc -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer XX.XXX.X.XX XX.XX.XX.XXX 80:XXXXX/TCP,443:XXXXX/TCP 17h
ingress-nginx-controller-admission ClusterIP XX.XXX.X.XX <none> 443/TCP 17h
{% endhint %}
Troubleshooting
If at any time you encounter an error during the installation process, reach out to support@appsmith.com or join our Discord Server
If you know the error and would like to reinstall Appsmith, simply delete the installation folder and the templates folder and execute the script again