Ensure that your Azure project has been set up properly and you have access to the resources that you want to use. Contact your administrators if you are not sure about your access permission.
Alternatively, you can use the Cloud Shell which has the Azure CLI, kubectl, and Helm preinstalled.
- Log on to the Azure portal.
- On the Azure portal menu or from the Home page, select Create a resource.
- Select Containers > Kubernetes Service.
- On the Basics page, configure the following options:
Subscription: Contact your organization's Azure Administrator to determine which subscription you should use.
- Resource group: Contact your organization's Azure Administrator to determine which resource group you should use.
Kubernetes cluster name: Enter a cluster name.
Region: Select a region.
Availability zones: Select availability zones as you need. For production clusters, we recommend that you select multiple availability zones.
Primary node pool:
Node size: We recommend that you choose VMs with a minimum of 16 GB of RAM, but you can select virtual machine sizes as you need.
Scale method: Choose a scale method.
Node count range: Select a range for the number of nodes.
Enable virtual nodes: Select the checkbox to enable virtual nodes.
Enable virtual machine scale sets: We recommend that you choose
Network configuration: We recommend that you choose
DNS name prefix: Enter a DNS name prefix.
HTTP application routing: Not required.
- After configuring the options, click Review + create and then Create when validation completes. It takes a few minutes to create the cluster.
- Navigate to the cluster that you have created in Kubernetes services and click it.
- On the left-side navigation pane, click
- On the Overview page that appears, click Connect to view the resource group and subscription.
- Run the following command to set your subscription.
az account set --subscription EXAMPLE-SUBSCRIPTION-ID
- Run the following command to download credentials and configure the Kubernetes CLI to use them.
az aks get-credentials --resource-group YOUR-RESOURCE-GROUP --name YOUR-CLUSTER-NAME
Azure Blob Storage is Azure's version of AWS Simple Storage Service (S3).
- Create storage account and container
az storage account create -n milvustesting1 -g MyResourceGroup -l eastus --sku Standard_LRS --min-tls-version TLS1_2 az storage container create -n testmilvus --account-name milvustesting1
- get secret key, use the first value
az storage account keys list --account-name milvustesting2
- Add values.yaml
cluster: enabled: true service: type: LoadBalancer extraConfigFiles: user.yaml: |+ common: storageType: remote minio: enabled: false externalS3: enabled: true host: core.windows.net port: 443 rootPath: my-release bucketName: testmilvus # the storage account container name cloudProvider: azure useSSL: true accessKey: "milvustesting1" # the storage account name secretKey: "<secret-key>"
Now the Kubernetes cluster is ready. Let's deploy Milvus right now.
helm repo add milvus https://zilliztech.github.io/milvus-helm/ helm repo update helm install -f values.yaml my-release milvus/milvus
In the preceding commands, we add the repo of Milvus Helm charts locally and update the repo to fetch the latest charts. Then we install a Milvus instance and name it my-release.
Notice the config
service.type value, which indicates that we would like to expose the Milvus instance through a Layer-4 load balancer.
Once all pods are running, run the following command to view the external IP address and port used to access the Milvus instance.
kubectl get services
The result is similar to the following:
Please refer to Hello Milvus, change the host value to service IP, then run the code.
If you want to learn how to deploy Milvus on other clouds: