Files
k8s-linstor/README.md
2023-03-15 13:19:09 +07:00

87 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Разворачиваем Linstor-кластер в kubernetes (piraeus)
## Что понадобиться
* rke up
* три тестовые ноды (ubuntu 22.04) с предустановленным кубом (предлагаю через rke)
* helm
* lens
## Что надо учесть
наличие headers на всех рабочих нодах, где будет разпускаться сателлиты
```bash
apt-get update && apt-get install -y linux-headers-$(uname -r)
```
## Ставим оператор
* kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
* kubectl apply --server-side -k "https://github.com/piraeusdatastore/piraeus-operator//config/default?ref=v2.0.1"
## Создаем кластер и зависимости
создаем сам кластер:
```yaml
apiVersion: piraeus.io/v1
kind: LinstorCluster
metadata:
name: linstorcluster
spec:
nodeSelector:
worker: 'yes'
```
создаем стародж:
```yaml
apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
name: storage-pool
spec:
storagePools:
- name: pool1
fileThinPool:
directory: /var/lib/piraeus-datastore/pool1
```
создаем сторадж-класс:
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: piraeus-storage-replicated
provisioner: linstor.csi.linbit.com
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
parameters:
linstor.csi.linbit.com/storagePool: pool1
linstor.csi.linbit.com/placementCount: "2"
```
## Создать тестовый деплой на примере мониторинга кластера
применяем конфигурацию lens-monitoring
## Полезные cli-команды списком
```bash
linstor node list
linstor storage-pool list
linstor resource list-volumes
```
## Видео к курсу
* [видео]()
##### Автор
* **Vassiliy Yegorov**
* [сайт](https://realmanual.ru)
* [youtube](https://youtube.com/realmanual)