Startup a 3 node Kuberentes cluster.
Run this in a shell to see the whats happening in the cluster:
watch -t -n1 'kubectl get pods -n rook -o wide && echo && echo && kubectl get pods -o wide && echo && echo && kubectl get pvc'
First create the operator:
kubectl create -f operator.yaml
Next create the cluster:
kubectl create -f cluster.yaml
```
Next create the pool and storageclass:
```
export MONS=$(kubectl -n rook get pod mon0 mon1 mon2 -o json|jq ".items[].status.podIP"|tr -d "\""|sed -e 's/$/:6790/'|paste -s -d, -) && sed 's#INSERT_HERE#'$MONS'#' pool.yaml | kubectl create -f -
```
Run the wordpress app:
```
kubectl create -f wordpress.yaml
```
Get the ip address of the wordpress pod and port:
```
kubectl get pods -o wide
kubectl get svc wordpress
```
# client
if you want to run the rook client:
```
kubectl create -f rook-client.yaml
kubectl -n rook exec rook-client -it bash
```
# cleanup
to cleanup run the following:
```
kubectl delete -f wordpress.yaml
kubectl delete deployment rook-operator
kubectl delete thirdpartyresources rookcluster.rook.io rookpool.rook.io
kubectl delete storageclass rook-block
kubectl delete secret rook-rbd-user
kubectl delete namespace rook
kubectl delete -f rook-client.yaml
```