Clean Up Rok Scheduler

This guide will walk you through removing the Rok Scheduler, along with the Rok Scheduler Webhook.

What You’ll Need

Check Your Environment

Before you remove Rok Scheduler and the Rok Scheduler Webhook, ensure your management environment has access to your Kubernetes cluster. Verify that you can list the nodes of your cluster:

root@rok-tools:~# kubectl get nodes NAME STATUS ROLES AGE VERSION aks-agentpool-42574219-vmss000000 Ready agent 47h v1.22.12 aks-agentpool-42574219-vmss000001 Ready agent 47h v1.22.12 aks-workers-42574219-vmss000000 Ready agent 46h v1.22.12 aks-workers-42574219-vmss000001 Ready agent 46h v1.22.12 aks-workers-42574219-vmss000002 Ready agent 46h v1.22.12

Procedure

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

    root@rok-tools:~# cd ~/ops/deployments
  2. Delete the Rok Scheduler:

    root@rok-tools:~/ops/deployments# rok-deploy --delete rok/rok-scheduler/overlays/deploy
  3. Delete the Rok Scheduler Webhook:

    root@rok-tools:~/ops/deployments# rok-deploy --delete rok/rok-scheduler-webhook/overlays/deploy

Verify

  1. Ensure the Rok Scheduler deployment no longer exists:

    root@rok-tools:~# kubectl get deploy -n rok-system rok-scheduler Error from server (NotFound): deployments.apps "rok-scheduler" not found
  2. Ensure the Rok Scheduler Webhook deployment no longer exists:

    root@rok-tools:~# kubectl get deploy -n rok-system rok-scheduler-webhook Error from server (NotFound): deployments.apps "rok-scheduler-webhook" not found
  3. Ensure the Rok Scheduler Webhook configuration no longer exists:

    root@rok-tools:~# kubectl get mutatingwebhookconfiguration rok-scheduler-webhook Error from server (NotFound): mutatingwebhookconfigurations.admissionregistration.k8s.io "rok-scheduler-webhook" not found

Summary

You have successfully removed the Rok Scheduler and the Rok Scheduler Webhook from your Kubernetes cluster.

What’s Next

The next step is to clean up all Rok components from your cluster.