Skip to main content

Quick Start

In this quick start, we will use Kubedoop's hive-operator as an example to show how to deploy a Hive Metastore in a Kubernetes cluster.

Prerequisites

To start using Kubedoop, you need to meet the following requirements:

  • Install kubectl
  • Install Helm v3+
  • Prepare a Kubernetes cluster

Install the Operator

Kubedoop uses Helm charts to deploy and manage Operators. Container images are published to quay.io and charts are distributed via a Helm repository.

Add the Helm Repository

helm repo add kubedoop https://zncdatadev.github.io/kubedoop-helm-charts/
helm repo update

Install Built-in Operators

The commons-operator, listener-operator, and secret-operator are required dependencies for all product Operators. Install them first:

helm install commons-operator kubedoop/commons-operator -n operators --create-namespace
helm install listener-operator kubedoop/listener-operator -n operators
helm install secret-operator kubedoop/secret-operator -n operators

Install the Hive Operator

helm install hive-operator kubedoop/hive-operator -n operators

Verify that the Operator pod is running normally:

kubectl get pods -n operators

Create Namespace

Create a namespace for Hive to deploy the Hive cluster:

kubectl create ns hive

Deploy a Hive Cluster

The Hive cluster is managed by the hive-operator. You can deploy a Hive Metastore by creating a HiveMetastore custom resource:

kubectl apply -f - <<EOF
apiVersion: hive.kubedoop.dev/v1alpha1
kind: HiveMetastore
metadata:
name: hive-metastore
namespace: hive
spec:
roleGroups:
default:
replicas: 1
EOF

Access Hive Metastore

After the Hive cluster is deployed, you can access the Hive Metastore with the following command:

kubectl exec -it hive-metastore-0 -n hive -- bash

Clean Up Resources

Run the following command to clean up the Hive cluster:

kubectl delete hivemetastore hive-metastore -n hive

Run the following command to uninstall the Operators:

helm uninstall hive-operator -n operators
helm uninstall secret-operator -n operators
helm uninstall listener-operator -n operators
helm uninstall commons-operator -n operators