milvus-logo
Star
0
Forks
0
Get Started

Install Milvus Cluster

This topic describes how to install Milvus cluster with Docker Compose or on Kubernetes.

Check the requirements for hardware and software prior to your installation.

If you run into image loading errors while installing, you can Install Milvus Offline.

You can also build Milvus from source code at GitHub.

We recommend installing Milvus on Kubernetes with minikube. minikube has a dependency on default storageclass when installed. Check the dependency by running the following command. Other installation methods requires manual configuration of the storageclass. See Change the Default Storageclass for more information.

$ kubectl get sc
NAME                  PROVISIONER                  RECLAIMPOLICY    VOLUMEBIINDINGMODE    ALLOWVOLUMEEXPANSION     AGE
standard (default)    k8s.io/minikube-hostpath     Delete           Immediate             false                    3m36s

Start a K8s cluster

This topic uses a local Kubernetes cluster based on minikube. You can deploy a Milvus cluster on your own Kubernetes cluster.
$ minikube start

Install Helm Chart for Milvus

Helm is a Kubernetes package manager that can help you deploy Milvus quickly.

  1. Add Milvus Helm repository.
$ helm repo add milvus https://milvus-io.github.io/milvus-helm/
  1. Update charts locally.
$ helm repo update

Configure and start Milvus

Start Milvus with Helm by specifying the release name, the chart, and parameters you expect to change. This topic uses my-release as the release name. To use a different release name, replace my-release in the command.

By running helm show values milvus/milvus, you can check the parameters that can be modified directly with Chart. You can configure these parameters by adding --values or --set in the command for installation. For more information, see Milvus Cluster System Configurations.

$ helm install my-release milvus/milvus
  • The default command line installs cluster version of Milvus while installing Milvus with Helm. Further setting is needed while installing Milvus standalone.
  • See Milvus Helm Chart and Helm for more information.

Check the status of the running pods.

$ kubectl get pods

After Milvus starts, the READY column displays 1/1 for all pods.

NAME                                             READY  STATUS   RESTARTS  AGE
my-release-etcd-0                                1/1    Running   0        3m23s
my-release-etcd-1                                1/1    Running   0        3m23s
my-release-etcd-2                                1/1    Running   0        3m23s
my-release-milvus-datacoord-6fd4bd885c-gkzwx     1/1    Running   0        3m23s
my-release-milvus-datanode-68cb87dcbd-4khpm      1/1    Running   0        3m23s
my-release-milvus-indexcoord-5bfcf6bdd8-nmh5l    1/1    Running   0        3m23s
my-release-milvus-indexnode-5c5f7b5bd9-l8hjg     1/1    Running   0        3m24s
my-release-milvus-proxy-6bd7f5587-ds2xv          1/1    Running   0        3m24s
my-release-milvus-querycoord-579cd79455-xht5n    1/1    Running   0        3m24s
my-release-milvus-querynode-5cd8fff495-k6gtg     1/1    Running   0        3m24s
my-release-milvus-rootcoord-7fb9488465-dmbbj     1/1    Running   0        3m23s
my-release-minio-0                               1/1    Running   0        3m23s
my-release-minio-1                               1/1    Running   0        3m23s
my-release-minio-2                               1/1    Running   0        3m23s
my-release-minio-3                               1/1    Running   0        3m23s
my-release-pulsar-autorecovery-86f5dbdf77-lchpc  1/1    Running   0        3m24s
my-release-pulsar-bookkeeper-0                   1/1    Running   0        3m23s
my-release-pulsar-bookkeeper-1                   1/1    Running   0        98s
my-release-pulsar-broker-556ff89d4c-2m29m        1/1    Running   0        3m23s
my-release-pulsar-proxy-6fbd75db75-nhg4v         1/1    Running   0        3m23s
my-release-pulsar-zookeeper-0                    1/1    Running   0        3m23s
my-release-pulsar-zookeeper-metadata-98zbr       0/1   Completed  0        3m24s

Connect to Milvus

Open a new terminal and run the following command to forward the local port to the port that Milvus uses.

$ kubectl port-forward service/my-release-milvus 19530
Forwarding from 127.0.0.1:19530 -> 19530

Uninstall Milvus

Run the following command to uninstall Milvus.

$ helm uninstall my-release

Stop the K8s cluster

Stop the cluster and the minikube VM without deleting the resources you created.

$ minikube stop

Run minikube start to restart the cluster.

Delete the K8s cluster

Delete the cluster, the minikube VM, and all resources you created including persistent volumes.

$ minikube delete
Run $ kubectl logs `pod_name` to get the stderr log of the pod before deleting the cluster and all resources.

What's next

Having installed Milvus, you can:

Is this page helpful?
On this page