Test Rok

This section will guide you through testing the snapshotting functionality of Rok, so that you make sure you have installed it properly.

What You’ll Need


  1. Go to your GitOps repository, inside your rok-tools management environment:

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

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

    root@rok-tools:~/ops/deployments# kubectl apply -f rok/rok-test/psql.yaml
  4. Expose Istio IngressGateway:

    root@rok-tools:~/ops/deployments# kubectl port-forward --address -n istio-system service/istio-ingressgateway 8080:80
  5. Forward traffic from your local host to rok-tools. Choose one of the following options based on how you created your management environment:

    user@workstation:~# kubectl port-forward services/rok-tools 8080:8080

    Skip to the next step.

    Skip to the next step.

  6. Visit the Rok login page at You will immediately be redirected to Dex in order to login.

  7. Login as user@example.com with the password you created when creating the user Rok account.

  8. From the Rok UI, create a bucket, and snapshot the PostgreSQL StatefulSets using the corresponding driver.

  9. Delete or terminate the node that a PostgreSQL pod was running on to trigger an automatic restore.

  10. Clean up the test resources you previously created:

    root@rok-tools:~/ops/deployments# kubectl delete -f rok/rok-test/rok-user-rbac.yaml
    root@rok-tools:~/ops/deployments# kubectl delete -f rok/rok-test/psql.yaml
    root@rok-tools:~/ops/deployments# kubectl delete pvc -l app=postgresql


You have successfully tested the snapshotting functionality of Rok.

What’s Next

The next step is to set up Rok storage class as your default storage class.