Kubernetes files for deploying HA Appwrite
MIT License
Status | 🏗️ Semi-ready |
---|
Appwrite uses microservice-based architecture as their deployment strategy.
All the Appwrite containers are completely stateless and runner-agnostic, which makes it straightforward to deploy Appwrite into any cluster and then horizontally scale it as needed.
Deploying HA Appwrite cluster is recommended to be done using Docker Swarm as can be seen here.
This repo is aiming to show how to deploy Appwrite into a Kubernetes cluster while keeping the OpenRuntime in a Docker Swarm cluster, like so.
- All the Appwrite images, including the databases, are being deployed into a k8s cluster
- The Open runtime is being deployed inside a Docker Compose environment or a Docker compose cluster.
- Appwrite files are being saved into a S3 bucket available for both clusters.
_APP_EXECUTOR_HOST
you should use a publicly available address either IP or domain, it will probably be best to use domain-name.In general, Docker Swarm is still the recommended approach, and it will be suitable for 90%+ of the cases.
For percentile 95 a thin k8s client could be sufficient, the recommendation is to check something like k3s by rancher.
You'll find two types of ways to deploy Appwrite in a k8s environments.
Type | Status |
---|---|
Imperative | Created automatically after each commit |
Declarative | β - Workable |
Helm | WIP |
Run this, good for quick test
kubectl apply -f https://raw.githubusercontent.com/byawitz/appwrite-k8s/main/imperative/appwrite.yml
#!/usr/bin/env bash
bash merge.sh
git add imperative/appwrite.yml
Run the following commands to deploy Appwrite in a declarative way
git clone https://github.com/byawitz/appwrite-k8s.git
kubectl apply -R -f ./declarative
echo -n "your-secret-key" | base64 -i -
Or by deploying them one by one.
kubectl create secret generic appwrite-secrets --from-literal=_APP_OPENSSL_KEY_V1=your-secret-key