Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created February 26, 2019 17:52
Show Gist options
  • Select an option

  • Save j-griffith/4e3dd034fa121d534211c23279b1308f to your computer and use it in GitHub Desktop.

Select an option

Save j-griffith/4e3dd034fa121d534211c23279b1308f to your computer and use it in GitHub Desktop.
Deploy Ceph RBD (CSI) using Rook
# From the root dir of the Rook repo
kubectl create -f cluster/examples/kubernetes/cep/operator.yaml
kubectl create -f cluster/examples/kubernetes/cep/cluster.yaml
kubectl create namespace rook-ceph-system
# create rbac. Since rook operator is not permitted to create rbac rules, these rules have to be created outside of operator
kubectl apply -f cluster/examples/kubernetes/ceph/csi/rbac/rbd/
kubectl apply -f cluster/examples/kubernetes/ceph/csi/rbac/cephfs/
kubectl create configmap csi-cephfs-config -n rook-ceph-system --from-file=cluster/examples/kubernetes/ceph/csi/template/cephfs
kubectl create configmap csi-rbd-config -n rook-ceph-system --from-file=cluster/examples/kubernetes/ceph/csi/template/rbd
kubectl apply -f cluster/examples/kubernetes/ceph/operator-with-csi.yaml
# Need to create a pool named "rbd"
cat << EOF | kubectl create -f -
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool
namespace: rook-ceph
spec:
failureDomain: host
replicated:
size: 3
EOF
# Run this script to setup keys and create SC: https://gist.github.com/j-griffith/002c040231859678744e35636e876928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment