[K8S] Steps to configure Rook Ceph BLOCK Storage on Vanilla Kubernetes cluster
Agenda:
- Attach new HDD
- Clone Rook Github Repo
- Install ROOK
- Configure the Storage Class
- Configure Volume Snapshot class
- Validate Snapshot Creation
1) Attach new HDD - 10GB (or As per your need).
2) Clone Rook Github Repo
A) mkdir /root/ROOK
B) cd /root/ROOK
# (SKIP the OLD) -> git clone --single-branch --branch release-1.5 https://github.
C) # USE LATEST ->
$ git clone --single-branch --branch v1.12.4 https://github.com/
3) Install ROOK
A) cd /root/ROOK/rook/deploy/
B) # BEFORE RUNNING FOLLOWING COMMAND, Update operator.yaml: CSI_PROVISIONER_REPLICAS: "1" -> (Default is 2, change it to 1).
C) kubectl create -f crds.yaml -f common.yaml -f operator.yaml
D) kubectl create -f cluster-test.yaml
E) # Run following command to validate installation:
kubectl -n rook-ceph get pod
4) Configure the Storage Class
A) cd /root/ROOK/rook/deploy/
B) kubectl apply -f storageclass-test.yaml
# Validate Storage class:
-------------------------
C) k get sc
rook-ceph-block rook-ceph.rbd.csi.ceph.com Delete Immediate true 19s
5) Configure Volume Snapshot class -> (For creating snapshots)
A) cd /root/ROOK/rook/deploy/
B) kubectl apply -f snapshotclass.yaml
# Validate it using:
--------------------
kubectl get VolumeSnapshotClass
NAME DRIVER DELETIONPOLICY AGE
csi-rbdplugin-snapclass rook-ceph.rbd.csi.ceph.com Delete 80s
6) Validate Snapshot Creation
A) Create snap.yaml with following (Update NS, VSC, & PVC):
---
apiVersion: snapshot.storage.
kind: VolumeSnapshot
metadata:
name: rbd-pvc-snapshot
namespace: shakti-rook-block-ns
spec:
volumeSnapshotClassName: csi-rbdplugin-snapclass
source:
persistentVolumeClaimName: pvc-new-test1
B) kubectl apply -f snap.yaml
C) kubectl get volumesnapshot -n <>
That's it.
REFERENCES:
---------------
1) https://platform9.com/
2) https://rook.io/docs/rook/
Comments
Post a Comment