Get Started

Install Milvus Cluster with Helm

This topic introduces how to deploy a Milvus cluster with Helm on Kubernetes (K8s).


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

Create a K8s Cluster

If you have already deployed a K8s cluster for production, you can skip this step and proceed directly to Install Helm Chart for Milvus. If not, you can follow the steps below to quickly create a K8s for testing, and then use it to deploy a Milvus cluster with Helm.

Create a K8s cluster using minikube

We recommend installing Milvus on K8s with minikube, a tool that allows you to run K8s locally.

minikube can only be used in test environments. It is not recommended that you deploy Milvus distributed clusters in this way in production environments.

1. Install minikube

See install minikube for more information.

2. Start a K8s cluster using minikube

After installing minikube, run the following command to start a K8s cluster.

$ minikube start

3. Check the K8s cluster status

Run $ kubectl cluster-info to check the status of the K8s cluster you just created. Ensure that you can access the K8s cluster via kubectl. If you have not installed kubectl locally, see Use kubectl inside minikube.

minikube has a dependency on default StorageClass when installed. Check the dependency by running the following command. Other installation methods require manual configuration of the StorageClass. See Change the default StorageClass for more information.

$ kubectl get sc
standard (default)     Delete           Immediate             false                    3m36s

Install Helm Chart for Milvus

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

  1. Add Milvus Helm repository.
$ helm repo add milvus
  1. Update charts locally.
$ helm repo update

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.

$ helm install my-release milvus/milvus
  • The release name should only contain letters, numbers and dashes. Dots are not allowed in the release name.
  • 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

Verify which local port the Milvus server is listening on. Replace the pod name with your own.

$ kubectl get pod my-release-milvus-standalone-54c4f88cb9-f84pf --template
='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'

Open a new terminal and run the following command to forward a local port to the port that Milvus uses. Optionally, omit the designated port and use :19530 to let kubectl allocate a local port for you so that you don't have to manage port conflicts.

$ kubectl port-forward service/my-release-milvus 27017:19530
Forwarding from -> 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

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

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

$ minikube delete

What's next

Having installed Milvus, you can:

Is this page helpful?
On this page