Skip to main content
This guide covers deploying KiwiFS to a Kubernetes cluster with persistent storage, configuration, and health checks.

Basic deployment

Create a Deployment and Service to run KiwiFS in your cluster.
kiwifs-deployment.yaml
kiwifs-service.yaml

Persistent storage

Use a PersistentVolumeClaim to store your knowledge base across pod restarts and rescheduling.
kiwifs-pvc.yaml
Use ReadWriteOnce access mode. KiwiFS manages its own concurrency and should not have multiple pods writing to the same volume simultaneously.

Configuration

ConfigMap

Store your KiwiFS configuration in a ConfigMap and mount it into the pod.
kiwifs-configmap.yaml
Add the ConfigMap volume to your Deployment.

Secrets

Store sensitive values like API keys and connection strings in a Secret.
kiwifs-secret.yaml
Reference the Secret as environment variables in the Deployment.

Health check probes

KiwiFS exposes three health endpoints. The liveness probe restarts the pod if KiwiFS becomes unresponsive. The readiness probe removes the pod from service endpoints until it finishes initializing and indexing.

NFS export for native volume mounts

KiwiFS includes a userspace NFSv3 server. You can use it to expose your knowledge base as a native NFS volume to other pods in the cluster.
The NFS server runs entirely in userspace. It does not require privileged mode or host kernel NFS support.

Step 1: Enable NFS on the KiwiFS pod

Add the --nfs flag and expose port 2049.
Create a Service for the NFS port.

Step 2: Mount from other pods

Other pods can mount the NFS export as a standard NFS volume.
Use readOnly: true on consumer pods to prevent accidental writes. Route all writes through the KiwiFS HTTP API instead.

Multi-space setup

Run multiple knowledge spaces by mounting separate PVCs and registering them with the --space flag.
Each space operates independently with its own directory, versioning history, and search index.

Ingress

Expose KiwiFS outside the cluster with an Ingress resource.
kiwifs-ingress.yaml
Set proxy-body-size high enough to handle file uploads. The default nginx limit of 1MB is too low for most knowledge bases.
Last modified on May 3, 2026