diff options
author | Alex <alex@adnab.me> | 2022-10-02 16:40:54 +0200 |
---|---|---|
committer | Alex <alex@adnab.me> | 2022-10-02 16:40:54 +0200 |
commit | e21b672c96da3c6d01a5ef964aa0ad7a38f8e74c (patch) | |
tree | 3c81b18ce35f168f7fe2b625340d484cf5037a9f /doc/book/cookbook | |
parent | b17d59cfabbe92c509f4888cae83f6053a8cab1e (diff) | |
parent | db0c8b3980c5cb056c9402332dd09a1bfb276997 (diff) | |
download | garage-e21b672c96da3c6d01a5ef964aa0ad7a38f8e74c.tar.gz garage-e21b672c96da3c6d01a5ef964aa0ad7a38f8e74c.zip |
Merge pull request 'Add helm chart' (#331) from chemicstry/garage:helm_chart into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/331
Reviewed-by: maximilien <me@mricher.fr>
Diffstat (limited to 'doc/book/cookbook')
-rw-r--r-- | doc/book/cookbook/kubernetes.md | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/doc/book/cookbook/kubernetes.md b/doc/book/cookbook/kubernetes.md new file mode 100644 index 00000000..9eafe3e1 --- /dev/null +++ b/doc/book/cookbook/kubernetes.md @@ -0,0 +1,87 @@ ++++ +title = "Deploying on Kubernetes" +weight = 32 ++++ + +Garage can also be deployed on a kubernetes cluster via helm chart. + +## Deploying + +Firstly clone the repository: + +```bash +git clone https://git.deuxfleurs.fr/Deuxfleurs/garage +cd garage/scripts/helm +``` + +Deploy with default options: + +```bash +helm install --create-namespace --namespace garage garage ./garage +``` + +Or deploy with custom values: + +```bash +helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml +``` + +After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI: + +```bash +kubectl exec --stdin --tty -n garage garage-0 -- ./garage status +``` + +## Overriding default values + +All possible configuration values can be found with: + +```bash +helm show values ./garage +``` + +This is an example `values.overrride.yaml` for deploying in a microk8s cluster with a https s3 api ingress route: + +```yaml +garage: + # Use only 2 replicas per object + replicationMode: "2" + +# Start 4 instances (StatefulSets) of garage +replicaCount: 4 + +# Override default storage class and size +persistence: + meta: + storageClass: "openebs-hostpath" + size: 100Mi + data: + storageClass: "openebs-hostpath" + size: 1Gi + +ingress: + s3: + api: + enabled: true + className: "public" + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/proxy-body-size: 500m + hosts: + - host: s3-api.my-domain.com + paths: + - path: / + pathType: Prefix + tls: + - secretName: garage-ingress-cert + hosts: + - s3-api.my-domain.com +``` + +## Removing + +```bash +helm delete --namespace garage garage +``` + +Note that this will leave behind custom CRD `garagenodes.deuxfleurs.fr`, which must be removed manually if desired. |