在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")
相关推荐
Rick19932 天前
Milvus 基本原理
milvus
Cosolar2 天前
万字详解:RAG 向量索引算法与向量数据库架构及实战
数据库·人工智能·算法·数据库架构·milvus
梵得儿SHI3 天前
(第四篇)Spring AI 架构设计与优化:真实生产环境复盘,从 100ms 到 10ms 的响应提速全流程
人工智能·缓存·性能优化·milvus·向量检索·rag·spring ai
Muyuan19985 天前
29.从 FAISS 到 Milvus:给我的 RAG Agent 项目加一层可替换的向量检索后端
fastapi·milvus·faiss
AIGC包拥它5 天前
RAG 项目实战进阶:基于 FastAPI + Vue3 前后端架构全面重构 LangChain 0.3 集成 Milvus 2.5 构建大模型智能应用
人工智能·python·重构·vue·fastapi·milvus·ai-native
My_Java_Life5 天前
windows中使用docker部署Milvus和Autt
windows·docker·milvus
霸道流氓气质6 天前
基于 Milvus Lite 的 Spring AI RAG 向量库实践方案与示例
人工智能·spring·milvus
隔窗听雨眠7 天前
基于Milvus混合检索与Java SpringBoot的全栈实现
milvus
毋语天7 天前
从零搭建 RAG 系统:Milvus 向量数据库 + 大模型完整实战指南
数据库·milvus
qq_283720058 天前
Milvus 向量数据库全链路优化实战教程
数据库·milvus