在minkube上部署Milvus

Milvus

Milvus是一个向量数据库,可以为ai做数据支撑。

Preparatory Work

minikube

minikube是一款微型本地k8s

install

sh 复制代码
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

sudo install minikube-linux-amd64 /usr/local/bin/minikube

minikube start --driver=docker --force
# use docker as driver and root as user

alias kubectl="minikube kubectl --"   # 可以设置成永久的 

如果没有红×提示,说明启动正常

Start

sh 复制代码
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
 
kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/deploy/manifests/deployment.yaml

kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvus_cluster_default.yaml

Check

使用以下命令检查pod状态,值得注意的是,安装时间可能会比较长,请耐心等待。

sh 复制代码
kubectl get pods

Connect

sh 复制代码
kubectl get pod my-release-milvus-proxy-84f67cdb7f-pg6wf --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'  # 替换pod名称

kubectl port-forward --address 0.0.0.0 service/my-release-milvus 27017:19530  # 将数据库端口映射到20717
py 复制代码
from pymilvus import connections
connections.connect("default", host="localhost", port="27017")
相关推荐
troy1281 天前
向量数据库选型指南:Milvus / Qdrant / Chroma / pgvector
数据库·milvus
2601_962097362 天前
开源向量数据库比较:Chroma, Milvus, Faiss,Weaviate
milvus·faiss·chroma·weaviate·开源向量数据库
一只小bit3 天前
LlamaIndex框架:简单RAG框架的全过程实现手册
llm·milvus·rag·llamaindex·deepseek
我有满天星辰3 天前
第一次使用 Milvus:给我的 AI 知识库装上“记忆”
人工智能·milvus
半兽先生3 天前
MySQL + Milvus vs PostgreSQL + pgvector:AI 应用向量检索架构选型终极指南
mysql·postgresql·milvus
我有满天星辰4 天前
《从 0 打造我的本地 AI 知识库:Obsidian + Ollama + Milvus + RAG + MCP + Agent》第 01 篇
人工智能·milvus
meilindehuzi_a5 天前
LangChain.js + Milvus 向量长期记忆实战:对话写入、语义检索与 RAG 增强
javascript·langchain·milvus
yanwumuxi5 天前
Milvus使用和改进
云原生·eureka·milvus