skills/kubeblocks-addon-milvus/SKILL.md
Deploy and manage Milvus vector database clusters on KubeBlocks for AI/ML workloads. Supports embedding similarity search, standalone (dev/test) and cluster (production) topologies. Use when the user mentions Milvus, vector database, AI embeddings, similarity search, or explicitly wants to create a Milvus cluster. Provides topology comparison, connection methods, and Day-2 operations. For generic cluster creation across all engines, see kubeblocks-create-cluster. For Day-2 operations (scaling, expose, etc.), use the corresponding operation skill.
npx skillsauth add apecloud/kubeblocks-skills kubeblocks-addon-milvusInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deploy Milvus vector database clusters on Kubernetes using KubeBlocks. Milvus powers embedding similarity search and AI applications. Supports standalone mode (single node, dev/test) and cluster mode (distributed, production) with etcd, MinIO, and optional Pulsar/Kafka for log storage.
Official docs: https://kubeblocks.io/docs/preview/kubeblocks-for-milvus/01-overview Quickstart: https://kubeblocks.io/docs/preview/kubeblocks-for-milvus/02-quickstart
# Check if milvus addon is installed
helm list -n kb-system | grep milvus
# Install if missing
helm install kb-addon-milvus kubeblocks/milvus --namespace kb-system --version 1.0.0
| Topology | Value | Components | Use Case |
|---|---|---|---|
| Standalone | standalone | milvus + etcd + minio | Dev/test, single node |
| Cluster | cluster | milvus-proxy, milvus-mixcoord, milvus-datanode, milvus-indexnode, milvus-querynode + etcd + minio (+ pulsar/kafka) | Production, distributed |
Default ports: 19530 (gRPC), 9091 (metrics).
| Version | serviceVersion |
|---|---|
| Milvus 2.3 | v2.3.2 |
| Milvus 2.5 | v2.5.13 |
List available: kubectl get cmpv milvus
- [ ] Step 1: Ensure addon is installed
- [ ] Step 2: Create namespace
- [ ] Step 3: Create cluster (choose topology)
- [ ] Step 4: Dry-run, then apply
- [ ] Step 5: Watch until Running, verify success
- [ ] Step 6: Connect and verify
helm list -n kb-system | grep milvus
If not found:
helm install kb-addon-milvus kubeblocks/milvus --namespace kb-system --version 1.0.0
kubectl create namespace demo --dry-run=client -o yaml | kubectl apply -f -
Single-node deployment with etcd and MinIO co-located. Suitable for development and testing:
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: milvus-standalone
namespace: demo
spec:
clusterDef: milvus
topology: standalone
terminationPolicy: Delete
componentSpecs:
- name: etcd
replicas: 1
resources:
limits: {cpu: "0.5", memory: "0.5Gi"}
requests: {cpu: "0.5", memory: "0.5Gi"}
volumeClaimTemplates:
- name: data
spec:
accessModes: [ReadWriteOnce]
resources: {requests: {storage: 20Gi}}
- name: minio
replicas: 1
resources:
limits: {cpu: "0.5", memory: "0.5Gi"}
requests: {cpu: "0.5", memory: "0.5Gi"}
volumeClaimTemplates:
- name: data
spec:
accessModes: [ReadWriteOnce]
resources: {requests: {storage: 20Gi}}
- name: milvus
replicas: 1
resources:
limits: {cpu: "0.5", memory: "0.5Gi"}
requests: {cpu: "0.5", memory: "0.5Gi"}
volumeClaimTemplates:
- name: data
spec:
accessModes: [ReadWriteOnce]
resources: {requests: {storage: 20Gi}}
Distributed deployment with proxy, mixcoord, datanode, indexnode, querynode. Requires pre-created etcd, minio, and optionally Pulsar/Kafka clusters. See cluster topology docs for full setup.
Key components: milvus-proxy (access), milvus-mixcoord (coordination), milvus-datanode, milvus-indexnode, milvus-querynode (compute), plus etcd, minio. Cluster mode uses serviceRef to reference external etcd, minio, and pulsar/kafka clusters.
Before applying, run server-side dry-run to catch RBAC, webhook, or schema errors:
kubectl apply -f cluster.yaml --dry-run=server
If dry-run succeeds, apply:
kubectl apply -f cluster.yaml
kubectl -n demo get cluster <cluster-name> -w
Success condition: STATUS shows Running. Typical duration: 2–5 min. Investigate after 10 min if still Creating/Updating (see safety-patterns).
Check pods:
kubectl -n demo get pods -l app.kubernetes.io/instance=<cluster-name>
kubectl port-forward pod/<cluster-name>-milvus-0 -n demo 19530:19530
Connect via localhost:19530 (gRPC). For cluster mode, port-forward to the proxy pod.
from pymilvus import connections
connections.connect(host="localhost", port=19530)
Cluster stuck in Creating:
kubectl -n demo describe cluster <cluster-name>
kubectl -n demo get events --sort-by='.lastTimestamp'
Milvus pod not starting:
kubectl -n demo logs <milvus-pod>
etcd or minio dependency issues:
componentSpecsOut of memory:
resources.limits.memory for milvus component| Operation | Skill | External Docs | |---|---|---| | Stop / Start / Restart | cluster-lifecycle | Docs | | Scale CPU / Memory | vertical-scaling | Docs | | Add / Remove replicas | horizontal-scaling | Docs | | Expose externally | expose-service | Docs |
Follow safety-patterns: dry-run before apply, confirm success condition after watch, pre-deletion checklist before delete.
devops
Expand persistent volume storage for KubeBlocks database clusters via OpsRequest. Requires the StorageClass to support volume expansion (allowVolumeExpansion=true). Use when the user needs more disk space, wants to increase storage, expand volumes, or resize PVCs. NOT for changing CPU/memory (see vertical-scaling) or adding more replicas (see horizontal-scaling). Note that volume shrinking is not supported by Kubernetes.
data-ai
Scale CPU and memory resources for KubeBlocks database clusters via OpsRequest (vertical scaling). Supports in-place updates when the feature gate is enabled. Use when the user wants to change, increase, decrease, resize, or adjust CPU or memory resources of a database cluster. NOT for adding/removing replicas or shards (see horizontal-scaling) or expanding disk storage (see volume-expansion).
data-ai
Upgrade the KubeBlocks operator itself via Helm. Covers update operator, upgrade to v1.0, update kubeblocks version, and CRD updates. Use when the user wants to upgrade KubeBlocks, update the operator, or upgrade to a new KubeBlocks release. NOT for upgrading database engine versions (see minor-version-upgrade).
development
Diagnostic guide for KubeBlocks-managed database clusters. Use when the user reports troubleshoot, debug, diagnose, not working, error, failed, stuck, CrashLoopBackOff, cluster exception, or similar problems with their database cluster. This skill guides the agent through diagnostic steps — it does NOT perform actions.