- Install and run HarperDB locally using Docker:
- Use the command: docker run -d -e HDB_ADMIN_USERNAME=user -e HDB_ADMIN_PASSWORD=password -p 9925:9925 harperdb/harperdb.
- Ensure port 9925 is open to connect to HarperDB Studio.
- Create a Kubernetes cluster:
- Use a managed Kubernetes service (e.g., Azure AKS).
- Create a new resource group and name the cluster.
- Connect to the Kubernetes cluster:
- Install Azure CLI and kubectl.
- Use az aks get-credentials -n harperdb -g harperdb-aks --admin to download credentials.
- Create a namespace for the database: kubectl create namespace database.
- Prepare the Kubernetes manifests (in manifests.yaml):
- Create a deployment for HarperDB with necessary configurations like environment variables, resource limits, ports, and volume mounts.
- Define a persistent volume claim (PVC) to request storage for data persistence.
- Apply the manifests to the cluster: kubectl apply -f ./manifests.yml.
- Verify the deployment and storage:
- Check the deployment status: kubectl get deploy harperdb -n database.
- Ensure the persistent volume is created in the Azure portal.
- Access HarperDB in the Kubernetes cluster:
- Forward the local connection to the service using: kubectl port-forward svc/harperdb 9925:9925 -n database.
- Access the HarperDB Studio in the browser and create a new instance using the credentials defined in the deployment manifest.
- Set up the database:
- Create a new database, user, and grant permissions as needed.