Skip to content

Commit

Permalink
update user documentation for using Helm chart (#449)
Browse files Browse the repository at this point in the history
* update README for Helm chart installation instructions

* add chart documentation

* fix incorrect ingress.annotations default value

* link to chart readme for installation instructions

* update getting started docs for helm chart

* don't manually format lines

* fix bitnami chart repo url

* move installation instructions link up in readme

* link for more detailed instructions

* add kubeapps CLI migration notice
  • Loading branch information
prydonius authored Aug 9, 2018
1 parent 515e823 commit 3eb28b7
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 103 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,28 @@ Kubeapps is a web-based UI for deploying and managing applications in Kubernetes

## Quickstart

Kubeapps assumes a working Kubernetes cluster (v1.8+) and [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and configured to talk to your Kubernetes cluster. Kubeapps binaries are available for Linux, OS X and Windows, and Kubeapps has been tested with Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE), `minikube` and Docker for Desktop Kubernetes. Kubeapps works on RBAC-enabled clusters and this configuration is encouraged for a more secure install.
Kubeapps assumes a working Kubernetes cluster (v1.8+) and [`Helm`](https://helm.sh/) (2.9.1+) installed in your cluster. Kubeapps has been tested with Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE), `minikube` and Docker for Desktop Kubernetes. Kubeapps works on RBAC-enabled clusters and this configuration is encouraged for a more secure install.

> On GKE, you must either be an "Owner" or have the "Container Engine Admin" role in order to install Kubeapps.
The simplest way to try Kubeapps is to deploy it with the Kubeapps Installer on [minikube](https://github.com/kubernetes/minikube). Assuming you are using Linux or OS X, run the following commands to download and install the Kubeapps Installer binary:
> **IMPORTANT**: Kubeapps v1.0.0-alpha.4 and below used the `kubeapps` CLI to install Kubeapps, Tiller and other components. Please [see the migration guide](docs/user/migrating-to-v1.0.0-alpha.5.md) when upgrading from a previous version to v1.0.0-alpha.5 and above.
Use the Helm chart to install the latest version of Kubeapps:

```bash
curl -s https://api.github.com/repos/kubeapps/kubeapps/releases/latest | grep -i $(uname -s) | grep browser_download_url | cut -d '"' -f 4 | wget -i -
sudo mv kubeapps-$(uname -s| tr '[:upper:]' '[:lower:]')-amd64 /usr/local/bin/kubeapps
sudo chmod +x /usr/local/bin/kubeapps
kubeapps up
kubeapps dashboard
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
```

These commands will deploy Kubeapps in your cluster and launch a browser with the Kubeapps dashboard.
The above commands will deploy Kubeapps into the `kubeapps` namespace in your cluster, it may take a few seconds to execute. For more information on installing and configuring Kubeapps, checkout the [chart README](chart/kubeapps/README.md).

Once it has been deployed and the Kubeapps pods are running, port-forward to access the Dashboard:

```bash
export POD_NAME=$(kubectl get pods -n kubeapps -l "app=kubeapps,release=kubeapps" -o name)
echo "Visit http://127.0.0.1:8080 in your browser to access the Kubeapps Dashboard"
kubectl port-forward -n kubeapps $POD_NAME 8080:8080
```

![Dashboard login page](docs/img/dashboard-login.png)

Expand All @@ -53,7 +60,7 @@ kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{
To remove Kubeapps from your cluster, simply run:

```bash
kubeapps down
helm delete --purge kubeapps
```

To delete the `kubeapps-operator` ServiceAccount and ClusterRoleBinding,
Expand All @@ -63,10 +70,6 @@ kubectl delete clusterrolebinding kubeapps-operator
kubectl delete serviceaccount kubeapps-operator
```

## Installation

Get the latest release of the Kubeapps installer for for platform from the [releases](https://github.com/kubeapps/kubeapps/releases) page, add it to your `PATH` and you're ready to go.

## Build from Source

Please refer to the [Kubeapps Build Guide](docs/developer/build.md) for instructions on setting up the build environment and building Kubeapps from source.
Expand All @@ -79,13 +82,12 @@ Please refer to the [Kubeapps Developer Documentation](docs/developer/README.md)

[Use Kubeapps](docs/user/dashboard.md) to easily manage your applications running in your cluster, or [look under the hood to see what's included in Kubeapps](docs/architecture/overview.md).

In case of difficulties installing Kubeapps, checkout the [more detailed installation instructions](docs/user/install.md).

For a more detailed and step-by-step introduction to Kubeapps, read our [introductory walkthrough](docs/user/getting-started.md).

## Useful Resources

* [Walkthrough for first-time users](docs/user/getting-started.md)
* [Detailed installation instructions](docs/user/install.md)
* [Detailed installation instructions](chart/kubeapps/README.md)
* [Kubeapps Dashboard documentation](docs/user/dashboard.md)
* [Kubeapps components](docs/architecture/overview.md)
142 changes: 142 additions & 0 deletions chart/kubeapps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# <img src="https://github.com/kubeapps/kubeapps/raw/master/docs/img/logo.png" width="40" align="left"> Kubeapps

[![Build Status](https://travis-ci.org/kubeapps/kubeapps.svg?branch=master)](https://travis-ci.org/kubeapps/kubeapps)

[Kubeapps](https://kubeapps.com) is a web-based UI for deploying and managing applications in Kubernetes clusters. Kubeapps allows you to:

- Browse and deploy [Helm](https://github.com/helm/helm) charts from chart repositories
- Inspect, upgrade and delete Helm-based applications installed in the cluster
- Add custom and private chart repositories (supports [ChartMuseum](https://github.com/helm/chartmuseum) and [JFrog Artifactory](https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories))
- Browse and provision external services from the [Service Catalog](https://github.com/kubernetes-incubator/service-catalog) and available Service Brokers
- Connect Helm-based applications to external services with Service Catalog Bindings
- Secure authentication and authorization based on Kubernetes [Role-Based Access Control](docs/user/access-control.md)

## TL;DR;

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
```

## Introduction

This chart bootstraps a [Kubeapps](https://kubeapps.com) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

It also packages the [Bitnami MongoDB chart](https://github.com/helm/charts/tree/master/stable/mongodb) which is required for bootstrapping a MongoDB deployment for the database requirements of the Kubeapps application.

## Prerequisites

- Kubernetes 1.8+ (tested with Azure Kubernetes Service, Google Kubernetes Engine, minikube and Docker for Desktop Kubernetes)
- Helm 2.9.1+
- PV provisioner support in the underlying infrastructure
- Administrative access to the cluster to create and update RBAC ClusterRoles

## Installing the Chart

To install the chart with the release name `kubeapps`:

```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
```

The command deploys Kubeapps on the Kubernetes cluster in the `kubeapps` namespace. The [configuration](#configuration) section lists the parameters that can be configured during installation.

> **Tip**: List all releases using `helm list`
## Upgrading Kubeapps

To upgrade Kubeapps, first ensure you have the updated your local chart repository cache:

```console
$ helm repo update
```

Now upgrade Kubeapps:

```console
$ export RELEASE_NAME=kubeapps
$ export NAMESPACE=kubeapps
$ export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace $NAMESPACE $RELEASE_NAME-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
$ helm upgrade $RELEASE_NAME bitnami/kubeapps --set mongodb.mongodbRootPassword=$MONGODB_ROOT_PASSWORD
```

The above commands ensure the MongoDB password is set to the existing password and not regenerated by the chart.

## Uninstalling Kubeapps

To uninstall/delete the `kubeapps` deployment:

```console
$ helm delete --purge kubeapps
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

For a full list of configuration parameters of the Kubeapps chart, see the [values.yaml](values.yaml) file.

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```console
$ helm install --name kubeapps --namespace kubeapps \
--set chartsvc.service.port=9090 \
bitnami/kubeapps
```

The above command sets the port for the chartsvc Service to 9090.

Alternatively, a YAML file that specifies the values for parameters can be provided while installing the chart. For example,

```console
$ helm install --name kubeapps --namespace kubeapps -f custom-values.yaml bitnami/kubeapps
```

### Configuring Initial Repositories

By default, Kubeapps will track the [community Helm charts](https://github.com/helm/charts) and the [Kubernetes Service Catalog charts](https://github.com/kubernetes-incubator/service-catalog). To change these defaults, override the `apprepository.initialRepos` object:

```console
$ cat > custom-values.yaml <<EOF
apprepository:
initialRepos:
- name: example
url: https://charts.example.com
EOF
$ helm install --name kubeapps --namespace kubeapps bitnami/kubeapps -f custom-values.yaml
```

### Exposing Externally

#### LoadBalancer Service

The simplest way to expose the Kubeapps Dashboard is to assign a LoadBalancer type to the Kubeapps frontend Service. For example:

```console
$ helm install --name kubeapps --namespace kubeapps bitnami/kubeapps --set frontend.service.type=LoadBalancer
```

Wait for your cluster to assign a LoadBalancer IP or Hostname to the `kubeapps` Service and access it on that address:

```console
$ kubectl get services --namespace kubeapps --watch
```

#### Ingress

This chart provides support for ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress](https://hub.kubeapps.com/charts/stable/nginx-ingress) or [traefik](https://hub.kubeapps.com/charts/stable/traefik) you can utilize the ingress controller to expose Kubeapps.

To enable ingress integration, please set `ingress.enabled` to `true`

##### Hosts

Most likely you will only want to have one hostname that maps to this Kubeapps installation, however, it is possible to have more than one host. To facilitate this, the `ingress.hosts` object is an array.

##### Annotations

For annotations, please see [this document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md). Not all annotations are supported by all ingress controllers, but this document does a good job of indicating which annotation is supported by many popular ingress controllers. Annotations can be set using `ingress.annotations`.

##### TLS

TLS can be configured using the `ingress.tls` object in the same format that the Kubernetes Ingress requests. Please see [this example](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tls) for more information.
5 changes: 1 addition & 4 deletions chart/kubeapps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ tillerProxy:
ingress:
enabled: false
# annotations: {}
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- kubeapps.local
- kubeapps.local
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down
2 changes: 1 addition & 1 deletion docs/user/dashboard.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using the Dashboard

Once you have [installed Kubeapps in your cluster](install.md) you can use the Dashboard to start managing and deploying applications in your cluster. Checkout the [Getting Started](getting-started.md) guide to learn how to access the Dashboard and deploy your first application.
Once you have [installed Kubeapps in your cluster](../../chart/kubeapps/README.md) you can use the Dashboard to start managing and deploying applications in your cluster. Checkout the [Getting Started](getting-started.md) guide to learn how to access the Dashboard and deploy your first application.

The following sections walk you through some common tasks with the Kubeapps Dashboard.

Expand Down
41 changes: 13 additions & 28 deletions docs/user/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,21 @@ Kubeapps assumes a working Kubernetes cluster (v1.8+) and [`kubectl`](https://ku

## Step 1: Install Kubeapps

To install Kubeapps, download the latest Kubeapps Installer binary for your platform from the [release page](https://github.com/kubeapps/kubeapps/releases).

Review our [installation guide](./install.md) for more detailed instructions.

Once the Kubeapps Installer is installed, deploy Kubeapps in your cluster with this command:

```
kubeapps up
```

You should see something like this as Kubeapps is deployed:

![Kubeapps deployment](../img/kubeapps-up.png)

If you would like to see what exactly `kubeapps up` is installing on your system, we provide `--dry-run` option to show you the Kubeapps manifest as below:
Use the Helm chart to install the latest version of Kubeapps:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
```
kubeapps up --dry-run -o yaml

# prefer json format
kubeapps up --dry-run -o json
```
For detailed information on installing and configuring Kubeapps, checkout the [chart README](../../chart/kubeapps/README.md).

To remove Kubeapps from your cluster, run this command:
The above commands will deploy Kubeapps into the `kubeapps` namespace in your cluster, it may take a few seconds to execute. Once it has been deployed and the Kubeapps pods are running, continue to step 2.

```
kubeapps down
```

## Step 2: Create a Kubernetes API token

Access to the dashboard requires a Kubernetes API token to authenticate with the Kubernetes API server.
Access to the Dashboard requires a Kubernetes API token to authenticate with the Kubernetes API server.

```
kubectl create serviceaccount kubeapps-operator
Expand All @@ -53,11 +36,13 @@ NOTE: It's not recommended to create `cluster-admin` users for Kubeapps. Please

Once Kubeapps is installed, securely access the Kubeapps Dashboard from your system by running:

```
kubeapps dashboard
```bash
export POD_NAME=$(kubectl get pods -n kubeapps -l "app=kubeapps,release=kubeapps" -o name)
echo "Visit http://127.0.0.1:8080 in your browser to access the Kubeapps Dashboard"
kubectl port-forward -n kubeapps $POD_NAME 8080:8080
```

This will start an HTTP proxy for secure access to the Kubeapps Dashboard and launch your default browser to access it. Here's what you should see:
This will start an HTTP proxy for secure access to the Kubeapps Dashboard. Visit http://127.0.0.1:8080/ in your preferred web browser to open the Dashboard. Here's what you should see:

![Dashboard login page](../img/dashboard-login.png)

Expand Down Expand Up @@ -93,6 +78,6 @@ To obtain the WordPress username and password, refer to the "Notes" section of t

Learn more about Kubeapps with the links below:

* [Detailed installation instructions](install.md)
* [Detailed installation instructions](../../chart/kubeapps/README.md)
* [Kubeapps Dashboard documentation](dashboard.md)
* [Kubeapps components](../architecture/overview.md)
56 changes: 1 addition & 55 deletions docs/user/install.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,3 @@
# Installation

Kubeapps assumes a working Kubernetes cluster (v1.8+) and [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and configured to talk to your Kubernetes cluster. Kubeapps binaries are available for Linux, OS X and Windows, and Kubeapps has been tested with Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE), `minikube` and Docker for Desktop Kubernetes. Kubeapps works on RBAC-enabled clusters and this configuration is encouraged for a more secure install.

> On GKE, you must either be an "Owner" or have the "Container Engine Admin" role in order to install Kubeapps.
## Install pre-built binary

* Download a binary version of the latest Kubeapps Installer for your platform from the [release page](https://github.com/kubeapps/kubeapps/releases). Currently, the Kubeapps Installer is distributed in binary form for Linux, OS X and Windows (64-bit).
* Make the binary executable.

For example, to install the latest binary release on Linux or OS X, use this command:

```
curl -s https://api.github.com/repos/kubeapps/kubeapps/releases/latest | grep -i $(uname -s) | grep browser_download_url | cut -d '"' -f 4 | wget -i -
sudo mv kubeapps-$(uname -s| tr '[:upper:]' '[:lower:]')-amd64 /usr/local/bin/kubeapps
sudo chmod +x /usr/local/bin/kubeapps
```

## Build binary from source

Please refer to the [Kubeapps Build Guide](../developer/build.md) for instructions on setting up the build environment and building Kubeapps from source.

# Next Steps

Confirm that [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) is installed and verify the Kubernetes version:

```
kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-06-29T23:15:59Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4", GitTreeState:"dirty", BuildDate:"2017-10-17T15:09:55Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
```

Use the Kubeapps Installer to deploy Kubeapps and launch a browser with the Kubeapps dashboard.

```
kubeapps up
kubeapps dashboard
```

To remove Kubeapps, use this command:

```
kubeapps down
```

# Exposing Externally

The main Kubernetes Service used to access Kubeapps is the `kubeapps` Service in the `kubeapps` namespace. To expose the dashboard for external access, you should setup an Ingress resource to point to the `kubeapps` Service and use an [Ingress Controller](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-controllers) to expose it.

An alternative way is to edit the `kubeapps` Service and change it's type from `ClusterIP` to `LoadBalancer`, if your cloud platform supports provisioning LoadBalancer IPs or Hostnames for Services. This solution is not recommended as updates to Kubeapps will likely revert the Service back to a `ClusterIP` type.

# Useful Resources

* [Walkthrough for new users](getting-started.md)
* [Kubeapps Dashboard documentation](dashboard.md)
* [Kubeapps components](../architecture/overview.md)
For detailed information on installing and configuring Kubeapps, checkout the [chart README](../../chart/kubeapps/README.md).

0 comments on commit 3eb28b7

Please sign in to comment.