blob: 012c05805a6c9888b89757345c06d08dae04d554 [file] [log] [blame] [view]
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +04001# Longhorn Chart
2
3> **Important**: Please install the Longhorn chart in the `longhorn-system` namespace only.
4
5> **Warning**: Longhorn doesn't support downgrading from a higher version to a lower version.
6
7## Source Code
8
9Longhorn is 100% open source software. Project source code is spread across a number of repos:
10
111. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine
122. Longhorn Instance Manager -- Controller/replica instance lifecycle management https://github.com/longhorn/longhorn-instance-manager
133. Longhorn Share Manager -- NFS provisioner that exposes Longhorn volumes as ReadWriteMany volumes. https://github.com/longhorn/longhorn-share-manager
144. Backing Image Manager -- Backing image file lifecycle management. https://github.com/longhorn/backing-image-manager
155. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager
166. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui
17
18## Prerequisites
19
201. A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.)
212. Kubernetes >= v1.21
223. Make sure `bash`, `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster.
234. 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.
24
25## Upgrading to Kubernetes v1.25+
26
27Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API.
28
29As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `enablePSP` set to `false` if it has been previously set to `true`.
30
31> **Note:**
32> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).**
33>
34> If your charts get stuck in this state, you may have to clean up your Helm release secrets.
35Upon setting `enablePSP` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart.
36
37As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Longhorn docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards.
38
39## Installation
401. Add Longhorn chart repository.
41```
42helm repo add longhorn https://charts.longhorn.io
43```
44
452. Update local Longhorn chart information from chart repository.
46```
47helm repo update
48```
49
503. Install Longhorn chart.
51- With Helm 2, the following command will create the `longhorn-system` namespace and install the Longhorn chart together.
52```
53helm install longhorn/longhorn --name longhorn --namespace longhorn-system
54```
55- With Helm 3, the following commands will create the `longhorn-system` namespace first, then install the Longhorn chart.
56
57```
58kubectl create namespace longhorn-system
59helm install longhorn longhorn/longhorn --namespace longhorn-system
60```
61
62## Uninstallation
63
64With Helm 2 to uninstall Longhorn.
65```
66kubectl -n longhorn-system patch -p '{"value": "true"}' --type=merge lhs deleting-confirmation-flag
67helm delete longhorn --purge
68```
69
70With Helm 3 to uninstall Longhorn.
71```
72kubectl -n longhorn-system patch -p '{"value": "true"}' --type=merge lhs deleting-confirmation-flag
73helm uninstall longhorn -n longhorn-system
74kubectl delete namespace longhorn-system
75```
76
77---
78Please see [link](https://github.com/longhorn/longhorn) for more information.