# Stackable Operator for Apache HBase

> Manage Apache HBase clusters on Kubernetes with the Stackable Operator: supports multiple HBase versions, integrates with ZooKeeper and HDFS.

-   [GitHub](https://github.com/stackabletech/hbase-operator/)

-   [Feature Tracker](https://features.stackable.tech/unified)

-   [CRD documentation](https://crds.stackable.tech/hbase-operator/26.7.0/)


This is an operator for Kubernetes that manages [Apache HBase](https://hbase.apache.org/) clusters. Apache HBase is an open-source, distributed, non-relational database that runs on top of the Hadoop Distributed File System (HDFS).

## Getting started

Follow the [Getting started](https://docs.stackable.tech/home/stable/hbase/getting_started/index.md) guide to learn how to [install](https://docs.stackable.tech/home/stable/hbase/getting_started/installation/index.md) the Stackable operator for Apache HBase as well as the dependencies. The guide shows you how to [interact](https://docs.stackable.tech/home/stable/hbase/getting_started/first_steps/index.md) with HBase running on Kubernetes by creating tables and some data using the REST API or Apache Phoenix.

The [Usage guide](https://docs.stackable.tech/home/stable/hbase/usage-guide/index.md) contains more information on [Using Apache Phoenix](https://docs.stackable.tech/home/stable/hbase/usage-guide/phoenix/index.md) as well as other topics such as [CPU and memory configuration](https://docs.stackable.tech/home/stable/hbase/usage-guide/resource-requests/index.md), [Monitoring](https://docs.stackable.tech/home/stable/hbase/usage-guide/monitoring/index.md) and [Log aggregation](https://docs.stackable.tech/home/stable/hbase/usage-guide/logging/index.md).

## Operator model

The operator manages the _HbaseCluster_ custom resource. You configure your HBase instance using this resource, and the operator creates Kubernetes resources such as StatefulSets, ConfigMaps and Services accordingly.

HBase uses three [roles](https://docs.stackable.tech/home/stable/concepts/stacklet/index.md): `masters`, `regionServers` and `restServers`.

![A diagram depicting the Kubernetes resources created by the operator](https://docs.stackable.tech/home/stable/hbase/_images/hbase_overview.drawio.svg)

For every RoleGroup a **StatefulSet** is created. Each StatefulSet can contain multiple replicas (Pods). For every RoleGroup a **Service** is created, as well as one for the whole cluster that references the `regionServers`. For every Role and RoleGroup the operator creates a **Service**.

A **ConfigMap** is created for each RoleGroup containing 3 files: `hbase-env.sh` and `hbase-site.xml` files generated from the HbaseCluster configuration (See [Usage guide](https://docs.stackable.tech/home/stable/hbase/usage-guide/index.md) for more information), plus a `log4j.properties` file used for [Log aggregation](https://docs.stackable.tech/home/stable/hbase/usage-guide/logging/index.md). The operator creates a **[discovery ConfigMap](https://docs.stackable.tech/home/stable/hbase/reference/discovery/index.md)** for the whole HbaseCluster a which contains information on how to connect to the HBase cluster.

## Dependencies

A distributed Apache HBase installation depends on a running Apache ZooKeeper and HDFS cluster. See the documentation for the [Stackable operator for Apache HDFS](https://docs.stackable.tech/home/stable/hdfs/index.md) how to set up these clusters.

## Demo

The [hbase-hdfs-cycling-data](https://docs.stackable.tech/home/stable/demos/hbase-hdfs-load-cycling-data/index.md) demo shows how you can use HBase together with HDFS.

## Supported versions

The Stackable operator for Apache HBase currently supports the HBase versions listed below. To use a specific HBase version in your HBaseCluster, you have to specify an image — this is explained in the [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) documentation. The operator also supports running images from a custom registry or running entirely customized images; both of these cases are explained under [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) as well.

-   2.6.4 (DEPRECATED)

-   2.6.6 (LTS)


## Useful links

-   The [hbase-operator](https://github.com/stackabletech/hbase-operator/) GitHub repository

-   The operator feature overview in the [feature tracker](https://features.stackable.tech/unified)

-   The [HbaseCluster](https://crds.stackable.tech/26.7.0/hbase.stackable.tech/hbasecluster/v1alpha1/) CRD documentation
