Containerized Linstor Storage easy to run in your Kubernetes cluster.
:warning: This project currently unmaintained
I decided join forces over creation the union solution for running LINSTOR on Kubenretes, and contribute missing features of this chart to upstream project: piraeus-operator.
If you want to upgrade, you can easily switch between them, see https://github.com/kvaps/kube-linstor/issues/53#issuecomment-1028006151 for more details.
Dockefiles continue maintaining in Deckhouse project.
Image | Latest Tag |
---|---|
linstor-controller | |
linstor-satellite | |
linstor-csi | |
linstor-stork | |
linstor-ha-controller |
v1.18
or higher).Kube-Linstor consists of several components:
NOTE: Commands below provided for Helm v3 but Helm v2 is also supported.
You can usehelm template
instead ofhelm install
, this is also working as well.
Create linstor
namespace.
kubectl create ns linstor
Install Helm repository:
helm repo add kvaps https://kvaps.github.io/charts
Install stolon chart:
# download example values
curl -LO https://github.com/kvaps/kube-linstor/raw/v1.14.0/examples/linstor-db.yaml
# install release
helm install linstor-db kvaps/stolon \
--namespace linstor \
-f linstor-db.yaml
NOTE: The current example will deploy stolon cluster on your Kubernetes-master nodes
NOTE: In case of update your stolon add
--set job.autoCreateCluster=false
flag to not reinitialisate your cluster.
Create Persistent Volumes:
helm install data-linstor-db-stolon-keeper-0 kvaps/pv-hostpath \
--namespace linstor \
--set path=/var/lib/linstor-db \
--set node=node1
helm install data-linstor-db-stolon-keeper-1 kvaps/pv-hostpath \
--namespace linstor \
--set path=/var/lib/linstor-db \
--set node=node2
helm install data-linstor-db-stolon-keeper-2 kvaps/pv-hostpath \
--namespace linstor \
--set path=/var/lib/linstor-db \
--set node=node3
Parameters name
and namespace
must match the PVC's name and namespace of your database, node
should match exact node name.
Check your PVC/PV list after creation, if everything right, they should obtain Bound status.
Connect to database:
kubectl exec -ti -n linstor sts/linstor-db-stolon-keeper -- bash
PGPASSWORD=$(cat $STKEEPER_PG_SU_PASSWORDFILE) psql -h linstor-db-stolon-proxy -U stolon postgres
Create user and database for linstor:
CREATE DATABASE linstor;
CREATE USER linstor WITH PASSWORD 'hackme';
GRANT ALL PRIVILEGES ON DATABASE linstor TO linstor;
Install kube-linstor chart:
# download example values
curl -LO https://github.com/kvaps/kube-linstor/raw/v1.14.0/examples/linstor.yaml
# install release
helm install linstor kvaps/linstor --version 1.14.0 \
--namespace linstor \
-f linstor.yaml
NOTE: The current example will deploy linstor- and csi-controllers on your Kubernetes-master nodes and satellites on all nodes in the cluster.
https://kubernetes-csi.github.io/docs/snapshot-controller.html#deployment
The satellite nodes will register themselves on controller automatically by init-container.
You can get interactive linstor shell by simple exec into linstor-controller pod:
kubectl exec -ti -n linstor deploy/linstor-controller -- linstor interactive
Refer to official linstor documentation to define storage pools on them and configure resource groups.
This chart enables SSL encryption for control-plane by default. It does not affect the DRBD performance but makes your LINSTOR setup more secure.
If you want to have external access, you need to download certificates for linstor client:
kubectl get secrets --namespace linstor linstor-client-tls \
-o go-template='{{ range $k, $v := .data }}{{ $v | base64decode }}{{ end }}'
Then follow official linstor documentation to configure the client.
Piraeus Operator is the operator that powers Piraeus, LINBIT's official Software Defined Storage (SDS) solution for Kubernetes. The dependencies of Kube-Linstor and Piraeus Operator are mostly shared, as both projects aim to create and administer LINSTOR clusters, but there are some differences in methodology and features: