[VectorDB] Milvus 설치를 해보자!
Milvus는 현재 Pinecone과 더불어 대중적으로 인기가 많은 Vector DB 서비스이다.
로컬 또는 클라우드를 이용하여 스토리지를 설정할 수 있다.
나는 로컬로 Milvus Standalone을 설치해보겠다.
일단 나는 윈도우 환경이기 때문에 윈도우 환경에서 설치할 수 있게 필요한 프로그램들을 다운받아야 한다.
아래 링크에서 Minikube를 설치해보자.
Minikube를 Windows에서 설치해보자.
MiniKube란? 각 OS에서 로컬 k8s 클러스터를 빠르게 설정해주는 도구이다. k8s 클러스터를 실행하려면 최소한으로 구성을 해줘야 되는 부분들이 있다.(sceduler, controller, api-server, .. 등) 이러한 구성들
junnnhhh.tistory.com
이제 본격적으로 Milvus Standalone을 설치해보자.
1. Install cert-manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
kubectl get pods -n cert-manager
cert-manager가 제대로 동작 중인지 확인한다.
이 때, STATUS가 Running이 아닐수도 있는데, get pods 를 이용해서 Running이 될때까지 확인한다.
NAME READY STATUS RESTARTS AGE
cert-manager-848f547974-gccz8 1/1 Running 0 70s
cert-manager-cainjector-54f4cc6b5-dpj84 1/1 Running 0 70s
cert-manager-webhook-7c9588c76-tqncn 1/1 Running 0 70s
2. Install Milvus Operator
kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/deploy/manifests/deployment.yaml
kubectl get pods -n milvus-operator
NAME READY STATUS RESTARTS AGE
milvus-operator-5fd77b87dc-msrk4 1/1 Running 0 46s
milvus-operator가 제대로 설치된 것을 확인할 수 있다.
3. Install Milvus standalone
kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvus_default.yaml
kubectl get milvus my-release -o yaml
실행해주면 milvus는 설치가 연결되었다.
이제 Milvus 서버를 로컬에서 사용할 수 있게 port-forward 작업이 필요하다.
// 여기서 pod 이름은 다를 수 있으니 kubectl get pods를 입력하고 my-release-milvus-proxy로 시작하는
// 이름을 그래도 입력하면 된다.
kubectl get pod my-release-milvus-proxy-84f67cdb7f-pg6wf --template
='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'
19530
kubectl port-forward service/my-release-milvus :19530
제대로 연결된 것을 확인할 수 있다.
Install Milvus Standalone with Milvus Operator
Learn how to install Milvus stanalone with Milvus Operator v2.3.x.
milvus.io