Deploy a Milvus Cluster on EKS
This topic describes how to deploy a Milvus cluster on Amazon EKS.
Prerequisites
Software requirements
Cloud security
- Access to EKS, EC2, and S3
- Access key ID
- Security access key
Deploy a Milvus cluster
- Copy the code from below code block, and save it to a file in yaml format, name the file as milvus_cluster.yaml.
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: my-eks-cluster
region: us-west-2
version: "1.23"
nodeGroups:
- name: ng-1-workers
labels: { role: workers }
instanceType: m5.4xlarge
desiredCapacity: 2
volumeSize: 80
iam:
withAddonPolicies:
ebs: true
addons:
- name: aws-ebs-csi-driver
version: v1.13.0-eksbuild.1 # optional
Run the following command to create an EKS cluster. The example in this topic uses my-eks-cluster
as the cluster name, and ‘us-west-2’ as the default region. You can replace them with your own values. See Getting started with Amazon EKS for more information.
eksctl create cluster -f milvus_cluster.yaml
You will see the following output if the EKS cluster is created.
...
[✓] EKS cluster "my-cluster" in "region-code" region is ready
After a Milvus cluster is provisioned, run the following command with a region and name for the cluster.
aws eks --region ${aws-region} update-kubeconfig --name ${cluster-name}
Create a kubeconfig file and run
kubectl get svc
. If successful, a cluster appears in the output.NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 106m
Add the Milvus Helm repository.
helm repo add milvus https://zilliztech.github.io/milvus-helm/
- Run the following command to start the Milvus cluster that you have provisioned. The access key and an S3 bucket are required to use S3 as storage.
helm upgrade --install --set cluster.enabled=true --set externalS3.enabled=true --set externalS3.host='s3.us-west-2.amazonaws.com' --set externalS3.port=80 --set externalS3.accessKey=${access-key} --set externalS3.secretKey=${secret-key} --set externalS3.bucketName=${bucket-name} --set minio.enabled=False --set service.type=LoadBalancer milvus milvus/milvus
- Run
kubectl get svc
again to retrieve the IP address of the load balancer and use it as the IP address of the Milvus cluster.
kubectl get pods
to view the running pods on the cluster.Scale the Milvus cluster
Currently, a Milvus cluster can only be scaled manually. Run the following command to modify the numbers of node instances with different types.
helm upgrade --install --set cluster.enabled=true --set dataNode.replicas=1 --set indexNode.replicas=1 --set queryNode.replicas=1 --set proxy.replicas=1 --set externalS3.enabled=true --set externalS3.host='s3.us-west-2.amazonaws.com' --set externalS3.port=80 --set externalS3.accessKey=${access-key} --set externalS3.secretKey=${secret-key} --set externalS3.bucketName=${bucket-name} --set minio.enabled=False --set service.type=LoadBalancer milvus milvus/milvus
After running the preceding command, you can run kubectl get pods
to view the newly created node instances.
What’s next
If you want to learn how to deploy Milvus on other clouds: