Skip to content

Uninstalling the RBLN NPU Operator

Remove the Helm or OLM resources for your installation. Replace the example resource names and rbln-system with your installation's values.

1. Stop workloads and identify resources

Check NPU workloads for each allocation method in use.

1
2
3
4
5
6
7
8
kubectl get pods -A \
  --field-selector='status.phase!=Succeeded,status.phase!=Failed' -o json | \
  jq -r '.items[]
    | select(any((.spec.containers + (.spec.initContainers // []))[];
        ((.resources.limits["rebellions.ai/npu"]
          // .resources.requests["rebellions.ai/npu"] // "0") | tonumber) > 0))
    | [.metadata.namespace, .metadata.name, (.spec.nodeName // "-")]
    | @tsv'

Check Pods that reference NPU claims.

kubectl get pods,resourceclaims,resourceclaimtemplates -A -o json | \
  jq -r '
    def npu_claim:
      any(.status.allocation.devices.results[]?; .driver == "npu.rebellions.ai")
      or any((.spec.spec // .spec).devices.requests[]?;
        any((.firstAvailable // [.exactly // .])[];
          .deviceClassName == "npu.rebellions.ai"
          or .deviceClassName == "vfio-npu.rebellions.ai"));
    [.items[]
      | select(.kind == "ResourceClaim" or .kind == "ResourceClaimTemplate")
      | select(npu_claim)
      | [.metadata.namespace, .kind, .metadata.name]] as $claims
    | .items[] | select(.kind == "Pod")
    | select(.status.phase != "Succeeded" and .status.phase != "Failed")
    | .metadata.namespace as $ns
    | select(
        any(.spec.resourceClaims[]?;
          [$ns, "ResourceClaim", .resourceClaimName] as $claim
          | [$ns, "ResourceClaimTemplate", .resourceClaimTemplateName] as $template
          | ($claims | index([$claim]) != null or index([$template]) != null))
        or any(.status.resourceClaimStatuses[]?;
          [$ns, "ResourceClaim", .resourceClaimName] as $claim
          | ($claims | index([$claim]) != null)))
    | [.metadata.namespace, .metadata.name, (.spec.nodeName // "-")]
    | @tsv'

List VMs and VMIs that request host devices. Identify entries that use rebellions.ai/ resources or NPU claims. Claim references have a claim: prefix.

1
2
3
4
5
6
7
8
kubectl get vm,vmi -A -o json | \
  jq -r '.items[]
    | (.spec.template.spec // .spec) as $spec
    | select(($spec.domain.devices.hostDevices // [] | length) > 0)
    | [.kind, .metadata.namespace, .metadata.name,
        ([$spec.domain.devices.hostDevices[]
          | .deviceName // ("claim:" + .claimName)] | join(","))]
    | @tsv'

For DRA, also check the NPU claims referenced by the VM's resourceClaims.

kubectl get resourceclaims -A \
  -o 'custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,CLASS:.spec.devices.requests[*].exactly.deviceClassName,DRIVER:.status.allocation.devices.results[*].driver'

Stop Pods and VMs that use NPUs. For Pods managed by a Deployment, Job, or another controller, stop the workload first so the Pods are not recreated.

After stopping the workloads, identify the RBLNClusterPolicy and RBLNDriver instances to remove.

$ kubectl get rblnclusterpolicy \
  -o 'custom-columns=NAME:.metadata.name,STATE:.status.state'
NAME                  STATE
rbln-cluster-policy   ready

$ kubectl get rblndriver \
  -o 'custom-columns=NAME:.metadata.name,STATE:.status.state,READY:.status.readyNodes,DESIRED:.status.desiredNodes'
NAME                   STATE   READY   DESIRED
rbln-driver-rebel100   ready   1       1
$ kubectl get rblnclusterpolicy \
  -o 'custom-columns=NAME:.metadata.name,STATE:.status.state'
NAME                  STATE
rbln-cluster-policy   ready

$ kubectl get rblndriver \
  -o 'custom-columns=NAME:.metadata.name,STATE:.status.state,READY:.status.readyNodes,DESIRED:.status.desiredNodes'
NAME               STATE   READY   DESIRED
rbln-driver-atom   ready   1       1

2. Remove the installation

Run the commands for your installation method.

Uninstall the Helm release. This also deletes the RBLNDriver and RBLNClusterPolicy instances created by the chart.

helm list -n rbln-system
helm uninstall rbln-npu-operator -n rbln-system --wait --timeout 5m

Delete the RBLNDriver instances identified in step 1.

Host-installed drivers

Skip this command if you use a host-installed driver and have no RBLNDriver instance.

1
2
3
export DRIVER_NAME='<RBLNDRIVER_NAME>'
oc delete rblndriver "$DRIVER_NAME" \
  --cascade=foreground --wait=true --timeout=180s

Specify the Subscription to remove and the OperatorGroup dedicated to this Operator. Delete the Subscription and its associated CSV.

1
2
3
4
5
6
7
8
oc get subscriptions,operatorgroups -n rbln-system
export SUBSCRIPTION=rbln-npu-operator
export OPERATOR_GROUP=rbln-npu-operator-group
CSV=$(oc get subscription "$SUBSCRIPTION" -n rbln-system \
  -o jsonpath='{.status.installedCSV}')
oc delete subscription "$SUBSCRIPTION" -n rbln-system
oc delete csv "$CSV" -n rbln-system
oc delete operatorgroup "$OPERATOR_GROUP" -n rbln-system

After removing the Operator, delete the RBLNClusterPolicy instance.

oc delete rblnclusterpolicy rbln-cluster-policy \
  --ignore-not-found --cascade=foreground --wait=true --timeout=180s

3. Verify resource removal

Check for remaining Operator-managed resources.

$ kubectl get pods,daemonsets,deployments -n rbln-system
No resources found in rbln-system namespace.

$ kubectl get rblnclusterpolicies,rblndrivers
No resources found

$ kubectl get clusterroles,clusterrolebindings \
  -l app.kubernetes.io/instance=rbln-npu-operator
No resources found

Confirm that the managed components and CRs have been deleted. For Helm installations, no RBAC resources with the release label should remain. See NPU Feature Discovery cleanup for node labels and feature files.

Additional cleanup (optional)

Delete only dedicated resources

Do not delete CRDs or namespaces used by other installations. Deleting a namespace also removes its PVCs and Secrets.

Remove CRDs

Check for remaining instances.

kubectl get rblnclusterpolicies,rblndrivers

Delete the CRDs only when no instances remain and the CRDs are no longer needed.

kubectl delete crd rblnclusterpolicies.rebellions.ai rblndrivers.rebellions.ai
kubectl get crd rblnclusterpolicies.rebellions.ai rblndrivers.rebellions.ai --ignore-not-found

Remove the namespace

Inspect the Operator's dedicated namespace and delete it if no longer needed. Remove tutorial Pods and Claims using each tutorial's cleanup steps.

kubectl get all,pvc,configmaps,secrets -n rbln-system
kubectl delete namespace rbln-system