Skip to content

Instantly share code, notes, and snippets.

@jgavinray
Last active Jun 22, 2021
Embed
What would you like to do?
Setting up local Minikube with Ceph for a small test lab
minikube start --memory="8GB" --cpus=4 --nodes=5 --driver kvm2
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m02.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m03.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m04.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m05.qcow2 25000M -o preallocation=full
virsh attach-disk --domain minikube-m02 /var/lib/libvirt/images/minikube-m02.qcow2 --target vdb --persistent --config --live
virsh attach-disk --domain minikube-m03 /var/lib/libvirt/images/minikube-m03.qcow2 --target vdb --persistent --config --live
virsh attach-disk --domain minikube-m04 /var/lib/libvirt/images/minikube-m04.qcow2 --target vdb --persistent --config --live
virsh attach-disk --domain minikube-m05 /var/lib/libvirt/images/minikube-m05.qcow2 --target vdb --persistent --config --live
minikube stop
minikube start
#git clone https://github.com/rook/rook
k create -f rook/cluster/examples/kubernetes/ceph/common.yaml
k create -f rook/cluster/examples/kubernetes/ceph/operator.yaml
k create -f rook/cluster/examples/kubernetes/ceph/crds.yaml
k create -f rook/cluster/examples/kubernetes/ceph/cluster.yaml
k create -f rook/cluster/examples/kubernetes/ceph/csi/rbd/storageclass.yaml
k patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
k patch storageclass rook-ceph-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment