在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")
相关推荐
SXJR16 天前
spring boot + langchain4j +milvus实现向量存储
java·spring boot·后端·大模型·milvus·rag·langchain4j
救救孩子把16 天前
11 Milvus-HNSW原理与实战
milvus
救救孩子把16 天前
13 Milvus-混合检索HybridSearch
milvus
海天一色y16 天前
深入理解 RAG 技术:从语义张量到向量数据库,Milvus 与 FAISS 全面对比
数据库·milvus·faiss
小饕17 天前
RAG学习之【向量数据库】Milvus 从入门到精通:索引、检索、混合搜索一篇打通(RAG 必备)
数据库·人工智能·学习·milvus
SilentSamsara17 天前
向量数据库实战:Chroma/Milvus/Qdrant 选型与语义搜索应用
开发语言·数据库·人工智能·python·青少年编程·milvus
救救孩子把17 天前
06 Milvus-Collection设计
milvus
沪漂阿龙17 天前
Vector Store:FAISS、Chroma、Milvus、Qdrant、ES 怎么选?
人工智能·elasticsearch·架构·milvus·faiss
救救孩子把18 天前
09 Milvus-向量索引原理
milvus
qq_3168377518 天前
华为CCE 部署milvus向量数据库
milvus