Skip to content

Commit

Permalink
docs: add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
saviogl committed Jun 21, 2022
1 parent b46a8bd commit df0200f
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions kube/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Deploying FarosCE on Kubernetes

We provide all required Kubernetes manifests for a full stack deployment in this repository under `kube/base`. These manifests can be used raw but are also exposed using [Kustomize](https://kustomize.io/) for a more flexible and scalable deployment model.

> Local Kubernetes clusters can be setup in a few different ways. Here's a list of the few most common tools for local K8s deployment: [kind](https://kind.sigs.k8s.io/), [k3d](https://k3d.io/v5.4.3/) or [minikube](https://minikube.sigs.k8s.io/docs/start/).
Provided you have have access to a Kubernetes cluster and have configured access to it via `kubectl`, FarosCE can be deployed with the following command:

```base
kustomize build --load-restrictor LoadRestrictionsNone https://github.com/saviogl/faros-community-edition/kube/base | kubectl apply -f -
```

Kustomize will load the deployment definition in this reposirotry over Github, build the manifests and pipe them over to `kubectl` for deployment in the configured cluster.

To access the deployed applications you can port forward onto the relevant services, for example:

```yaml
# Expose Airbyte to localhost
kubectl port-forward svc/airbyte-webapp-svc 8000:80
# Expose Metabase to localhost
kubectl port-forward svc/metabase 3000:80
# Expose Hasura to localhost
kubectl port-forward svc/hasura 8080:80
# Expose N8N to localhost
kubectl port-forward svc/n8n 5678:80
```

> Kubernetes services can also be exposed using NodePort, Ingress, or External LoadBalancers. This will vary depending on your Kubernetes cluster.
### Using kustomization.yaml file

For a more declaritve and GitOps friendly deployment approach you can create your own local `kustomization.yaml` file, put it under a source control system and reference the same path in the resources attribute.

```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/saviogl/faros-community-edition/kube/base
```

> This allow you to customize the Kubernetes resources objects in any way you want to meet whatever desired cluster requiremenets you might have
With this file available you can run the following command from the same path to build and apply the manifests:

```yaml
kustomize build --load-restrictor LoadRestrictionsNone . | kubectl apply -f -
```

0 comments on commit df0200f

Please sign in to comment.