Rook Storage for Kubernetes
Background
Installation Process
Rook Operator
- set up all the namespace, roles, bindings, and support definition
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl create -f common.yaml
- create the rook operator
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl create -f operator.yaml
Using Existing Ceph Cluster
- create the separate namespace where the ceph cluster definition will live
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl create -f common-external.yaml
- create secrets based on information extracted from ceph cluster
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>bash ./import-external-cluster.sh
- note that the above script adds too many secrets -- the operator tries to create them and errors out since they can't be changed.
- We need to either edit the script to not create the excess secrets or delete the ones that aren't needed
- see which secrets are in the namespace for the external cluster
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl get secret -n rook-ceph-external
- these are the ones that need to be deleted (at least for now)
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl -n rook-ceph-external delete secret \
rook-csi-cephfs-node rook-csi-cephfs-provisioner rook-csi-rbd-node rook-csi-rbd-provisioner
- create the cluster definition
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl create -f cluster-external-management.yaml
- create the ceph pool and storage class definition for RBD images
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes/ceph>kubectl create -f storageclass-block.yaml
Creating an internal Ceph Cluster
Testing
- deploy the test application
- each deployment requests its own Persistent Volume
- the wordpress service is a LoadBalancer, so it will allocate an IP address that should give direct access to the wordpress instance
(ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes>kubectl create -f mysql.yaml (ewilliam@aslan)/workspace/outside-repos/rook/cluster/examples/kubernetes>kubectl create -f wordpress.yaml