Skip to content

Commit

Permalink
Documentation for using Operators (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Martinez Gotor authored Apr 2, 2020
1 parent 7165fa4 commit 27b2fde
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chart/kubeapps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ Kubeapps supports two database types: MongoDB or PostgreSQL. By default MongoDB

> **Note**: Changing the database type when upgrading is not supported.
### Enabling Operators

Since v1.9.0, Kubeapps supports to deploy and manage Operators within its dashboard. To enable this feature, set the flag `featureFlags.operators=true`. More information about how to enable and use this feature can be found in [this guide](https://github.com/kubeapps/kubeapps/blob/master/docs/user/operators.md).

### [Only for Helm 2] Configuring connection to a custom namespace Tiller instance

By default, Kubeapps connects to the Tiller Service in the `kube-system` namespace, the default install location for Helm.
Expand Down
Binary file added docs/img/OLM-not-installed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/installed-operators.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operator-catalog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operator-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operator-installation-instructions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operator-instance-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operator-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/operators-available.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/user/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ You can also use the URLs shown to directly access the application. Note that, d
Learn more about Kubeapps with the links below:

- [Detailed installation instructions](../../chart/kubeapps/README.md)
- [Deploying Operators](./operators.md)
- [Kubeapps Dashboard documentation](dashboard.md)
- [Kubeapps components](../architecture/overview.md)
- [Roadmap](https://github.com/kubeapps/kubeapps/wiki/Roadmap)
85 changes: 85 additions & 0 deletions docs/user/operators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Get Started with Operators in Kubeapps

This guide will walk you through the process of enabling support for Operators in Kubeapps and deploy an Operator instance.

In this tutorial we will be using the the [Operator Lifecycle Manager (OLM)](https://github.com/operator-framework/operator-lifecycle-manager) to expose the Operators from the [OperatorHub](https://operatorhub.io/).

## Prerequisites

Kubeapps assumes a working Kubernetes cluster (v1.12+) and [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and configured to talk to your Kubernetes cluster. Users following this tutorial require to have admin privileges in the cluster in order to install and manage Operators.

## Step 1: Enabling Operators support in Kubeapps

The support for Operators is currently under heavy development. For the moment, it's not enabled by default. If you want to use it, you need to enable the related feature flag. This can be done either at installation time or when upgrading Kubeapps. It's just necessary to enable the flag `featureFlags.operators`:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps --set featureFlags.operators=true
```

If you are using Helm 3:

```bash
kubectl create namespace kubeapps
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps --set featureFlags.operators=true
```

For detailed information on installing, configuring and upgrading Kubeapps, checkout the [chart README](../../chart/kubeapps/README.md).

## Step 2: Install the Operator Lifecycle Manager (OLM)

Once you access the dashboard, if you go to Configuration => Operators, you will see a message alerting that the OLM is not installed:

![OLM Not Intalled](../img/OLM-not-installed.png)

Follow the instructions to install the latest OLM version:

```bash
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/install.sh | bash -s 0.14.1
```

Note that you will need special permissions to manage Operators. If you receive a Forbidden error, apply the following ClusterRole to your admin user:

```bash
kubectl create clusterrolebinding kubeapps-operator-cluster-admin --clusterrole=cluster-admin --serviceaccount kubeapps:kubeapps-operator
```

NOTE: replace the `kubeapps:kubeapps-operator` with the service account you are using or the cluster user.

## Step 3: Install an Operator

After some minutes, you should be able to see the full list of Operators available:

![Operators Available](../img/operators-available.png)

Let's deploy the "Akka Cluster Operator". When clicking on it, the information about the Operator is displayed:

![Operators View](../img/operator-view.png)

When clicking on the Deploy button, instructions on how to deploy the operator will be displayed. There are two type of Operators: Global and namespaced. Namespaced Operators will be available in a single namespace while global Operators across the cluster. In this case, we are installing a global Operator:

![Operator Installation Instructions](../img/operator-installation-instructions.png)

Once the Operator is installed it would be listed like that and you can start deploy instances of that Operator:

![Installed Operators](../img/installed-operators.png)

## Step 4: Deploy an Operator Instance

Now, available Operators are listed in the Catalog along with the existing Helm Charts:

![Operators Catalog](../img/operator-catalog.png)

You can filter out Charts and select the Akka Cluster example. That would render the YAML form in which you can modify any setting in order to deploy a custom instance:

![Operator Form](../img/operator-form.png)

Finally, when the instance gets deployed, after some minutes, you will be able to inspect its status and resources:

![Operator Instance View](../img/operator-instance-view.png)

You can also click in the Update button to modify the instance or in the Delete button to remove it.

## Step 5: Provide Feedback

We need your feedback to improve this integration! If you find any issue or have a suggestion please [open an issue in GitHub](https://github.com/kubeapps/kubeapps/issues/new) or contact us in the [#kubeapps](https://kubernetes.slack.com/messages/kubeapps) channel in Slack.

0 comments on commit 27b2fde

Please sign in to comment.