2020-10-22 20:16:09 +00:00
# Longhorn Chart
2019-05-08 17:21:58 +00:00
2020-10-26 18:54:54 +00:00
> **Important**: Please install the Longhorn chart in the `longhorn-system` namespace only.
2020-06-04 18:33:20 +00:00
> **Warning**: Longhorn doesn't support downgrading from a higher version to a lower version.
2019-05-18 19:47:42 +00:00
2019-05-08 17:21:58 +00:00
## Source Code
Longhorn is 100% open source software. Project source code is spread across a number of repos:
2019-11-12 01:34:48 +00:00
1. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine
2020-04-20 13:23:18 +00:00
2. Longhorn Instance Manager -- Controller/replica instance lifecycle management https://github.com/longhorn/longhorn-instance-manager
2020-12-15 06:24:39 +00:00
3. Longhorn Share Manager -- NFS provisioner that exposes Longhorn volumes as ReadWriteMany volumes. https://github.com/longhorn/longhorn-share-manager
2021-04-29 01:05:37 +00:00
4. Backing Image Manager -- Backing image file lifecycle management. https://github.com/longhorn/backing-image-manager
5. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager
6. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui
2019-05-08 17:21:58 +00:00
## Prerequisites
2021-03-11 08:28:41 +00:00
1. A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.)
2020-12-09 06:47:13 +00:00
2. Kubernetes v1.16+
2021-06-18 02:18:02 +00:00
3. Make sure `bash` , `curl` , `findmnt` , `grep` , `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster.
2021-03-11 08:28:41 +00:00
4. Make sure `open-iscsi` has been installed, and the `iscsid` daemon is running on all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already.
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
## Installation
2020-10-26 18:51:35 +00:00
1. Add Longhorn chart repository.
2020-10-13 11:25:14 +00:00
```
2020-10-22 20:16:09 +00:00
helm repo add longhorn https://charts.longhorn.io
2020-10-13 11:25:14 +00:00
```
2020-10-22 20:16:09 +00:00
2. Update local Longhorn chart information from chart repository.
```
helm repo update
```
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
3. Install Longhorn chart.
2020-10-26 18:51:35 +00:00
- With Helm 2, the following command will create the `longhorn-system` namespace and install the Longhorn chart together.
2020-10-22 20:16:09 +00:00
```
helm install longhorn/longhorn --name longhorn --namespace longhorn-system
```
2020-10-26 18:51:35 +00:00
- With Helm 3, the following commands will create the `longhorn-system` namespace first, then install the Longhorn chart.
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
```
kubectl create namespace longhorn-system
helm install longhorn longhorn/longhorn --namespace longhorn-system
```
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
## Uninstallation
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
With Helm 2 to uninstall Longhorn.
```
helm delete longhorn --purge
```
2019-05-08 17:21:58 +00:00
2020-10-22 20:16:09 +00:00
With Helm 3 to uninstall Longhorn.
2019-05-08 17:21:58 +00:00
```
2020-10-22 20:16:09 +00:00
helm uninstall longhorn -n longhorn-system
kubectl delete namespace longhorn-system
2019-05-08 17:21:58 +00:00
```
---
2019-11-12 01:34:48 +00:00
Please see [link ](https://github.com/longhorn/longhorn ) for more information.