helm repo add rook-release https://charts.rook.io/release
helm repo update
tolerations: []
nodeSelector: {}
helm install --namespace rook-ceph rook-ceph rook-release/rook-ceph -f rook-values.yaml
then add a full rook-deployment.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: rook-ceph
---
# ceph-cluster.yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
cephVersion:
image: quay.io/ceph/ceph:v18.2.0
dataDirHostPath: /var/lib/rook
mon:
count: 3
allowMultiplePerNode: false
storage:
useAllNodes: true
useAllDevices: true
deviceFilter: "^sd[b-z]" # Use SSDs (adjust per node)
dashboard:
enabled: true
placement:
all:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node 1 #replace with proper fqdns
- node 2
- node 3
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
clusterID: rook-ceph
pool: replicapool
imageFeatures: layering
csi.storage.k8s.io/provisioner-secret-name: ceph-csi-secret
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: ceph-csi-secret
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: ceph-csi-secret
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Delete
allowVolumeExpansion: true
---
apiVersion: v1
kind: Secret
metadata:
name: ceph-csi-secret
namespace: rook-ceph
type: kubernetes.io/rbd
data:
userID: <user> # must be base64 encoded
userKey: <key> # must be base64 encoded
To get the key, run
kubectl -n rook-ceph get secret rook-ceph-admin-keyring -o yaml
The output the keyringneeds to be encoded:
echo -n "<output> | base 64
and that goes into the key above.