Skip to content

Commit

Permalink
docs: update ephemeral kubernetes plugin documentation (#5195)
Browse files Browse the repository at this point in the history
* docs: update ephemeral kubernetes plugin documentation

* chore: update table of content

* chore: fix dead link

* docs: remove ephemeral cluster guide
  • Loading branch information
twelvemo authored Oct 11, 2023
1 parent ca28ff1 commit b0b1954
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 123 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/kubernetes/ephemeral/ephemeral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const gardenPlugin = () =>
The \`${EPHEMERAL_KUBERNETES_PROVIDER_NAME}\` provider is a specialized version of the [\`kubernetes\` provider](${providerUrl}) that allows to deploy applications to one of the ephemeral Kubernetes clusters provided by Garden.
For information about using ephemeral Kubernetes clusters, please refer to [Ephemeral Kubernetes clusters guide](../../guides/ephemeral-clusters.md)
For information about using ephemeral Kubernetes clusters, please refer to [Ephemeral Kubernetes clusters guide](../../k8s-plugins/ephemeral-k8s/README.md)
`,
configSchema: configSchema(),
outputsSchema,
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
* [2. Configure the Provider](./k8s-plugins/local-k8s/configure-provider.md)
* [Ephemeral K8s Plugin Configuration](./k8s-plugins/ephemeral-k8s/README.md)
* [1. Configure the Provider](./k8s-plugins/ephemeral-k8s/configure-provider.md)
* [2. Configure Ingress](./k8s-plugins/ephemeral-k8s/ingress.md)
* [3. Manage ephemeral clusters](./k8s-plugins/ephemeral-k8s/manage-clusters.md)
* [2. Login to the Garden Web Dashboard](./k8s-plugins/ephemeral-k8s/login-web-dashboard.md)
* [3. Configure Ingress (optional)](./k8s-plugins/ephemeral-k8s/ingress.md)
* [4. Retrieve Kubeconfig (optional)](./k8s-plugins/ephemeral-k8s/retrieve-kubeconfig.md)
* [Action Configuration](./k8s-plugins/action-types/README.md)
* [Container](./k8s-plugins/action-types/container.md)
* [Kubernetes](./k8s-plugins/action-types/kubernetes.md)
Expand Down Expand Up @@ -91,12 +92,11 @@
## 🌼 Guides

* [Migrating to Bonsai](./guides/migrating-to-bonsai.md)
* [Environments and namespaces](./guides/namespaces.md)
* [Code Synchronization](./guides/code-synchronization.md)
* [Connecting a local application to a Kubernetes cluster (Local Mode)](./guides/running-service-in-local-mode.md)
* [Environments and namespaces](./guides/namespaces.md)
* [Migrating from Docker Compose to Garden](./guides/migrating-from-docker-compose.md)
* [Code Synchronization](./guides/code-synchronization.md)
* [Using Garden in CI](./guides/using-garden-in-ci.md)
* [Ephemeral Kubernetes Clusters](./guides/ephemeral-clusters.md)

## 🌷 Advanced

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ git clone https://github.com/garden-io/quickstart-example.git && cd quickstart-e

### Step 3 — Deploy the project

Now we can deploy the example project to an [ephemeral Kubernetes cluster](../guides/ephemeral-clusters.md) provided by Garden.
Now we can deploy the example project to an [ephemeral Kubernetes cluster](../k8s-plugins/ephemeral-k8s/README.md) provided by Garden.

From inside the project directory, log in to the Garden web dashboard by running the log in command from the dev console:

Expand Down
79 changes: 0 additions & 79 deletions docs/guides/ephemeral-clusters.md

This file was deleted.

23 changes: 21 additions & 2 deletions docs/k8s-plugins/ephemeral-k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,27 @@ order: 4

# Ephemeral K8s Plugin Configuration

Garden Ephemeral Kubernetes clusters are meant for short-term use and to allow you to run and test your applications with Garden on a remote Kubernetes cluster. They are available for all users in our **Community Tier**.
Garden Ephemeral Kubernetes clusters are meant for short-term use and to allow you to run and test your applications with Garden on a remote Kubernetes cluster. They are available for all users in our **Community Tier**.

Your ephemeral cluster is not shared with other Garden users, but due to its ephemeral nature, it is not suitable for production workloads. Ingress is secured by TLS and needs authentication via GitHub. That means your application will not be publicly available in the internet.

## Requirements

To use the `ephemeral-kubernetes` plugin you need to use Garden `>=0.13.14` and be logged in to the Garden Web Dashboard at https://app.garden.io.
To use the ephemeral Kubernetes plugin, you'll need the following:

- Use Garden `>=0.13.14`
- Log in to the Garden Web Dashboard at https://app.garden.io.
- Configure Ingress (optional)
- Retrieve Kubeconfig (optional). This is only relevant if you want to access the cluster with other tools than Garden e.g. kubectl.

## Usage quota

Each user is granted a maximum of **20 hours per month** of ephemeral cluster usage where each cluster has a maximum lifetime of **4 hours**. After this period, the cluster is automatically destroyed.

If you need to destroy the cluster before its maximum lifetime of 4 hours expires, you can do so by visiting your [web dashboard](https://app.garden.io) and selecting the option to destroy the ephemeral cluster from there. This allows you to release resources and terminate the cluster when it's no longer needed.

## Limitations

As of today, the `ephemeral-kubernetes` provider has the following limitations:

- Local docker builds are currently not supported. In-cluster building with Kaniko is the only supported building method and it is configured by default at the provider level.
10 changes: 5 additions & 5 deletions docs/k8s-plugins/ephemeral-k8s/ingress.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: 2. Configure Ingress
order: 2
title: 3. Configure Ingress (optional)
order: 3
---

# 2. Ingress and networking
# 3. Configure Ingress (optional)

Ephemeral Kubernetes Clusters fully support ingresses and each cluster is assigned its own unique default hostname dynamically when created. This hostname and its direct subdomains are secured by TLS and require authentication.
Garden will automatically install the nginx ingress controller for ephemeral Kubernetes. If you wish to disable it see [here](#using-your-own-ingress-controller).

### Configuring ingress
## Configuring ingress

If you want to refer to the hostname that is assigned dynamically when the cluster is created, you can refer to that using the output `${providers.ephemeral-kubernetes.outputs.default-hostname}`. This can be useful if, for example, you want to expose an ingress on a subdomain of the default hostname.

Expand Down Expand Up @@ -42,7 +42,7 @@ spec:
hostname: frontend.${var.base-hostname}
```
### Authentication for ingress
## Authentication for ingress
The ingress URLs are not publicly accessible and require authentication via GitHub. To preview an ingress URL, you need to authenticate with GitHub and authorize the "Garden Ephemeral Environment Previews" app.
Expand Down
12 changes: 12 additions & 0 deletions docs/k8s-plugins/ephemeral-k8s/login-web-dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: 2. Login to the Garden Web Dashboard
order: 2
---

# 2. Login to the Garden Web Dashboard

To use the ephemeral kubernetes provider you have to be logged in to the [Garden Web Dashboard](https://app.garden.io) from Garden CLI. To do so run the following command from your project root (no further configuration required):

```
garden login
```
29 changes: 0 additions & 29 deletions docs/k8s-plugins/ephemeral-k8s/manage-clusters.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/k8s-plugins/ephemeral-k8s/retrieve-kubeconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: 4. Retrieve Kubeconfig (optional)
order: 4
---

# 4. Retrieve Kubeconfig (optional)

Once your ephemeral cluster is created, the kubeconfig file for that cluster is stored on your local machine. The path to the kubeconfig file is shown in the logs when you deploy your project using Garden and looks like the following:
```
kubeconfig for ephemeral cluster saved at path: /garden/examples/ephemeral-cluster-demo/.garden/ephemeral-kubernetes/<cluster-id>-kubeconfig.yaml
```

This kubeconfig file allows you to interact with the cluster using `kubectl` or other Kubernetes tools.
2 changes: 1 addition & 1 deletion docs/reference/providers/ephemeral-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This feature is still experimental and only available in Garden `>=0.13.14`. Ple

The `ephemeral-kubernetes` provider is a specialized version of the [`kubernetes` provider](./kubernetes.md) that allows to deploy applications to one of the ephemeral Kubernetes clusters provided by Garden.

For information about using ephemeral Kubernetes clusters, please refer to [Ephemeral Kubernetes clusters guide](../../guides/ephemeral-clusters.md)
For information about using ephemeral Kubernetes clusters, please refer to [Ephemeral Kubernetes clusters guide](../../k8s-plugins/ephemeral-k8s/README.md)

Below is the full schema reference for the provider configuration. For an introduction to configuring a Garden project with providers, please look at our [configuration guide](../../using-garden/configuration-overview.md).

Expand Down

0 comments on commit b0b1954

Please sign in to comment.