Milvus Semantic Cache
This guide covers deploying Milvus as the semantic cache backend for the Semantic Router in Kubernetes. Milvus provides persistent, scalable vector storage compared to the default in-memory cache.
Milvus is optional. The router works with the default memory backend out of the box. Use Milvus when you need persistence, horizontal scaling, or cache sharing across router replicas.
Deployment Options
Two approaches are available:
- Helm: Quick start and parameterized deployments
- Milvus Operator: Production-grade lifecycle management, rolling upgrades, health checks, and dependency orchestration
Prerequisites
- Kubernetes cluster with
kubectlconfigured - Default
StorageClassavailable - Helm 3.x installed
The default Helm values enable ServiceMonitor for Prometheus metrics collection, which requires Prometheus Operator to be installed first.
For testing without Prometheus Operator, disable ServiceMonitor using --set metrics.serviceMonitor.enabled=false (see deployment commands below).
Deploy with Helm
Standalone Mode
Suitable for development and small-scale deployments:
helm repo add milvus https://zilliztech.github.io/milvus-helm/
helm repo update
Without Prometheus Operator (for testing/development):
helm install milvus-semantic-cache milvus/milvus \
--set cluster.enabled=false \
--set etcd.replicaCount=1 \
--set minio.mode=standalone \
--set pulsar.enabled=false \
--set metrics.serviceMonitor.enabled=false \
--namespace vllm-semantic-router-system --create-namespace
With Prometheus Operator (production with monitoring):
helm install milvus-semantic-cache milvus/milvus \
--set cluster.enabled=false \
--set etcd.replicaCount=1 \
--set minio.mode=standalone \
--set pulsar.enabled=false \
--namespace vllm-semantic-router-system --create-namespace