mdcms/neuraldb-docs/pages/install-kubernetes.md

80 lines
1.5 KiB
Markdown

---
title: Kubernetes
sort: 110
section-id: installation
keywords: Kubernetes, Helm, StatefulSet, PVC, k8s, cluster, deployment
description: Deploying NeuralDB on Kubernetes using the official Helm chart and StatefulSets
language: en
---
# Kubernetes
The recommended way to run NeuralDB on Kubernetes is via the official Helm chart.
## Installing the Helm Chart
```bash
helm repo add neuraldb https://charts.neuraldb.io
helm repo update
kubectl create namespace neuraldb
helm install neuraldb neuraldb/neuraldb \
--namespace neuraldb \
--set auth.password=mysecretpassword \
--set persistence.size=100Gi
```
## Chart Configuration
```yaml
image:
repository: neuraldb/neuraldb
tag: "1.0"
replicaCount: 1
readReplicaCount: 2
resources:
requests:
cpu: "2"
memory: "8Gi"
limits:
cpu: "8"
memory: "32Gi"
persistence:
enabled: true
storageClass: "fast-ssd"
size: 500Gi
vectorBuffer: "16Gi"
sharedBuffers: "8Gi"
maxConnections: 200
ha:
enabled: true
replication:
mode: synchronous
backup:
enabled: true
schedule: "0 2 * * *"
s3:
bucket: my-neuraldb-backups
region: us-east-1
```
## Services
| Service | Port | Description |
|---------|------|-------------|
| `neuraldb-primary` | 5432 | Primary — reads + writes |
| `neuraldb-replica` | 5432 | Read replicas — reads only |
| `neuraldb-headless` | 5432 | StatefulSet pod discovery |
## Scaling Read Replicas
```bash
helm upgrade neuraldb neuraldb/neuraldb \
--namespace neuraldb \
--set readReplicaCount=4
```