Deploy on Azure
Run Hive on your own Azure infrastructure using Azure Kubernetes Service (AKS).
Prerequisites
- An Azure subscription
azCLI installed and authenticatedkubectlinstalled
Create an AKS cluster
az group create --name hive-rg --location eastus
az aks create \
--resource-group hive-rg \
--name hive-cluster \
--node-count 3 \
--node-vm-size Standard_D4s_v3 \
--generate-ssh-keys
az aks get-credentials --resource-group hive-rg --name hive-clusterDeploy the Hive controller
kubectl apply -f https://install.hive.run/operator/azure.yamlCreate a service principal and store its credentials:
az ad sp create-for-rbac --name hive-sp --role Contributor \
--scopes /subscriptions/$SUBSCRIPTION_ID > sp.json
kubectl create secret generic hive-azure-credentials \
--from-literal=client-id=$(jq -r .appId sp.json) \
--from-literal=client-secret=$(jq -r .password sp.json) \
--from-literal=tenant-id=$(jq -r .tenant sp.json)Apply the cluster config:
file.yaml
apiVersion: hive.run/v1
kind: HiveCluster
metadata:
name: hive
spec:
provider: azure
subscriptionId: your-subscription-id
resourceGroup: hive-rg
region: eastus
credentials:
secretRef: hive-azure-credentials
sandboxes:
maxConcurrent: 100
defaultImage: ubuntu:24.04
storage:
type: blob
account: myhivestorage
container: hive-dataVerify
kubectl get hivecluster hive
# NAME STATUS ENDPOINT AGE
# hive Ready https://hive.internal.example 2mConnect the TypeScript client
Pass gatwayUrl to point the SDK at your deployed controller:
index.ts
import { getOrCreateSandbox, shutdown } from "hive";
const sandbox = await getOrCreateSandbox("my-sandbox", {
fs: [{ backend: "local", mount: "/workspace", acls: [{ path: "/workspace/**", access: "rw" }] }],
}, {
gatwayUrl: "https://hive.internal.example",
});Back to GCP