# Repairing a cluster with HBCK2

> Use HBCK2 from hbase-operator-tools to repair HBase clusters. It helps fix issues like unknown RegionServers via the hbck2 script.

[HBCK2](https://github.com/apache/hbase-operator-tools/tree/master/hbase-hbck2) is the repair tool for Apache HBase clusters. It is included in the [hbase-operator-tools](https://github.com/apache/hbase-operator-tools/). The hbase-operator-tools are installed in the Docker image provided by Stackable in the directory `/stackable/hbase-operator-tools/`. HBCK2 can be executed via the wrapper script `hbck2`.

For instance, if you followed the [First steps](https://docs.stackable.tech/home/stable/hbase/getting_started/first_steps/index.md) then you have a cluster called `simple-hbase` running. Let us assume that the HBase user interface reports unknown RegionServers, then you can schedule the ServerCrashProcedure for these RegionServers by applying the following Job:

```yaml
---
apiVersion: batch/v1
kind: Job
metadata:
  name: hbck2-recover-unknown
spec:
  template:
    spec:
      containers:
      - name: hbck2
        image: oci.stackable.tech/sdp/hbase:2.6.4-stackable26.11.0
        volumeMounts:
        - name: hbase-config
          mountPath: /stackable/conf
        env:
        - name: HBASE_CONF_DIR
          value: /stackable/conf
        - name: HADOOP_CONF_DIR
          value: /stackable/conf
        command:
        - hbck2
        args:
        - recoverUnknown
      volumes:
      - name: hbase-config
        projected:
          sources:
          - configMap:
              name: simple-hdfs
          - configMap:
              name: simple-hbase-master-default
```
