Test Rok

In order to test the snapshotting functionality of Rok, execute the following commands from within rok-tools:

  1. Go inside the local clone of Arrikto’s deployments git repository:

    root@rok-tools-0:/# cd ~/ops/deployments
  2. Grant user cluster admin privileges to snapshot K8s resources with Rok:

    root@rok-tools-0:~/ops/deployments# kubectl apply -f rok/rok-test/rok-user-rbac.yaml
  3. Deploy a PostgreSQL application with two StatefulSets:

    root@rok-tools-0:~/ops/deployments# kubectl apply -f rok/rok-test/psql.yaml
  4. Expose Istio’s IngressGateway with kubectl port-forward:

    root@rok-tools-0:~/ops/deployments# kubectl port-forward --address -n istio-system service/istio-ingressgateway 8080:80


    If you are running rok-tools as a Kubernetes StatefulSet you will need a double kubectl port-forward to also forward traffic from your local host to the rok-tools Kubernetes Service:

    $ kubectl port-forward services/rok-tools 8080:8080
  5. Visit Rok’s login page at You will immediately be redirected to Dex in order to login.

  6. Login as user with the password you specified previously.

  7. Go to the Rok UI, create a bucket, and snapshot the PostgreSQL StatefulSets using the corresponding driver.

Optionally, delete/terminate the node that a PostgreSQL pod was running on to trigger an automatic restore.


Cleanup created resources:

$ kubectl delete -f rok/rok-test/rok-user-rbac.yaml
$ kubectl delete -f rok/rok-test/psql.yaml
$ kubectl delete pvc -l app=postgresql