### Example Global SecurityContext Configuration for Milvus Pods Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/security-context-configuration-guide.md This example demonstrates a detailed global `securityContext` configuration for Milvus components. It ensures that pods run as a non-root user (ID 1000) and sets specific group and filesystem group IDs, enhancing the overall security posture of the Milvus deployment. ```yaml securityContext: runAsNonRoot: true runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 ``` -------------------------------- ### Install MinIO Operator Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Commands to remove the old MinIO Helm repository, add the new operator-based repository, install the MinIO operator, and apply a sample tenant configuration. This process migrates to the new operator-driven deployment model. ```bash helm repo remove minio helm repo add minio https://operator.min.io/ helm install --namespace minio-operator --create-namespace --generate-name minio/minio-operator kubectl apply -f https://github.com/minio/operator/blob/master/examples/tenant.yaml ``` -------------------------------- ### Example Global Tolerations Configuration for Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This example demonstrates how to configure global tolerations in the Milvus Helm chart. It includes tolerations for nodes dedicated to Milvus ('dedicated=milvus') and nodes with high memory usage ('memory-intensive'), allowing pods to schedule on tainted nodes. ```yaml tolerations: # Allow scheduling on nodes dedicated to Milvus - key: "dedicated" operator: "Equal" value: "milvus" effect: "NoSchedule" # Allow scheduling on nodes with high memory usage - key: "memory-intensive" operator: "Exists" effect: "PreferNoSchedule" ``` -------------------------------- ### Create MinIO Buckets Post-Installation with Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Shows how to pre-configure MinIO buckets to be created automatically after the Helm chart installation. This includes specifying the bucket's name, access policy, and whether it should be purged if it already exists, all within the `helm install --set` command. ```bash $ helm install --set buckets[0].name=bucket1,buckets[0].policy=none,buckets[0].purge=false minio/minio ``` -------------------------------- ### Install MinIO Helm Chart with Custom Access and Secret Keys Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Installs the MinIO Helm chart while overriding the default access and secret keys. This allows you to set your desired credentials directly during the installation process for enhanced security. ```bash helm install --set accessKey=myaccesskey,secretKey=mysecretkey --generate-name minio/minio ``` -------------------------------- ### Kubernetes Pod Affinity Configuration Example Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md This YAML illustrates a `preferredDuringSchedulingIgnoredDuringExecution` pod affinity rule. It encourages scheduling pods on nodes that already host pods with the `app=cache` label, with a weight of 100, promoting co-location of related services. ```yaml podAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: # Must run on pods with app=cache label - key: app operator: In values: - cache topologyKey: kubernetes.io/hostname ``` -------------------------------- ### Add MinIO Helm Repository Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Adds the official MinIO Helm chart repository to your Helm configuration. This step is necessary before you can install MinIO charts from the repository. ```bash helm repo add minio https://helm.minio/ ``` -------------------------------- ### Install MinIO Helm Chart with Auto-Generated Name Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Installs the MinIO Helm chart into the 'minio' namespace. Helm will automatically generate a unique release name for this deployment. ```bash helm install --namespace minio --generate-name minio/minio ``` -------------------------------- ### Deploy MinIO in distributed mode using Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md This command installs the MinIO Helm chart configured to run in distributed mode. It sets the `mode` parameter to `distributed` using the `--set` flag, provisioning a multi-node MinIO setup that defaults to 4 nodes. ```bash $ helm install --set mode=distributed minio/minio ``` -------------------------------- ### Deploy Milvus Standalone Mode with Kafka Message Queue Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus in standalone mode, configuring Kafka as the message queue. This requires enabling `kafka` and setting `standalone.messageQueue` to `kafka`. ```bash helm upgrade --install my-release --set cluster.enabled=false --set standalone.messageQueue=kafka --set etcd.replicaCount=1 --set pulsarv3.enabled=false --set kafka.enabled=true --set minio.mode=standalone milvus/milvus ``` -------------------------------- ### Install MinIO Helm Chart with Custom Release Name Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Installs the MinIO Helm chart, allowing you to specify a custom release name for the deployment. This provides a more descriptive and memorable identifier for your MinIO instance. ```bash helm install my-release minio/minio ``` -------------------------------- ### Install Milvus with Custom Values File Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus using a previously prepared `values.yaml` file, allowing for custom configurations such as embedded ETCD and local storage, overriding default chart values. ```bash helm upgrade --install -f values.yaml my-release milvus/milvus ``` -------------------------------- ### Kubernetes Node Affinity Configuration Example Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md This snippet demonstrates a `requiredDuringSchedulingIgnoredDuringExecution` node affinity rule. It ensures that pods are scheduled only on nodes that have the `kubernetes.io/instance-type` label set to either `m5.2xlarge` or `m5.4xlarge`, useful for ensuring components run on specific hardware. ```yaml nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: # Must run on nodes with kubernetes.io/instance-type=m5.2xlarge or m5.4xlarge label - key: kubernetes.io/instance-type operator: In values: - m5.2xlarge - m5.4xlarge ``` -------------------------------- ### MinIO Affinity Configuration Template for Milvus Dependency Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules for the MinIO dependency of Milvus. Dependencies require separate affinity configurations as global Milvus settings do not apply to them. ```yaml minio: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Deploy Milvus Standalone Mode with Default Configuration Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus in standalone mode using the default `rocksmq` as the message queue. This command sets `cluster.enabled` to false, `etcd.replicaCount` to 1, `pulsarv3.enabled` to false, and `minio.mode` to standalone. ```bash helm upgrade --install my-release --set cluster.enabled=false --set etcd.replicaCount=1 --set pulsarv3.enabled=false --set minio.mode=standalone milvus/milvus ``` -------------------------------- ### Configure node selector for Pulsar Proxy Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet provides an example of setting a node selector for the Proxy component within a Pulsar deployment. It schedules the Proxy on nodes labeled with 'component: pulsar-proxy', managing client connections. ```yaml pulsar: proxy: # Pulsar proxy will be scheduled on nodes with component=pulsar-proxy label nodeSelector: component: pulsar-proxy ``` -------------------------------- ### Isolate QueryNode Components with Node Affinity Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md This example demonstrates using node affinity to schedule `queryNode` pods exclusively on nodes labeled `node-purpose=compute-optimized`. This isolates compute-intensive components on dedicated resources, preventing resource contention and improving performance. ```yaml queryNode: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: # Must run on nodes with node-purpose=compute-optimized label - key: node-purpose operator: In values: - compute-optimized ``` -------------------------------- ### Install MinIO using a custom values file with Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md This command shows how to deploy the MinIO Helm chart by providing a custom `values.yaml` file. The `-f` flag allows specifying a YAML file containing all desired configuration parameters, offering a more structured way to manage complex configurations. ```bash $ helm install --name my-release -f values.yaml minio/minio ``` -------------------------------- ### Add Milvus Helm Repository Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Adds the official Milvus Helm chart repository to your Helm configuration, allowing you to fetch Milvus charts for installation and upgrades. ```bash helm repo add milvus https://zilliztech.github.io/milvus-helm/ ``` -------------------------------- ### Deploy Milvus Standalone Mode with Pulsar Message Queue Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus in standalone mode, configuring Pulsar as the message queue. This requires enabling `pulsarv3` and setting `standalone.messageQueue` to `pulsar`. ```bash helm upgrade --install my-release --set cluster.enabled=false --set standalone.messageQueue=pulsar --set etcd.replicaCount=1 --set pulsarv3.enabled=true --set minio.mode=standalone milvus/milvus ``` -------------------------------- ### Configure node selector for Milvus Data Node component Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet provides an example of setting a node selector for the Milvus Data Node. It schedules the data node on nodes with the 'component: data' label, ensuring data processing components are placed on appropriate infrastructure. ```yaml dataNode: # Milvus data node will be scheduled on nodes with component=data label nodeSelector: component: data ``` -------------------------------- ### Etcd Affinity Configuration Template for Milvus Dependency Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules for the Etcd dependency of Milvus. Dependencies require separate affinity configurations as global Milvus settings do not apply to them. ```yaml etcd: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Milvus Proxy Affinity Configuration Template Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules specifically for the Milvus Proxy component. These settings override any global affinity configurations for the proxy. ```yaml proxy: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Individual Milvus Coordinator Affinity Configuration Templates Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Templates for configuring affinity rules for individual Milvus coordinator components (Root, Query, Index, Data) when the Mix Coordinator is not used. Each coordinator can have specific node, pod, and anti-affinity settings. ```yaml rootCoordinator: affinity: # Root coordinator affinity rules queryCoordinator: affinity: # Query coordinator affinity rules indexCoordinator: affinity: # Index coordinator affinity rules dataCoordinator: affinity: # Data coordinator affinity rules ``` -------------------------------- ### Deploy MinIO with custom persistence size using Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md This command demonstrates how to install the MinIO Helm chart, setting a specific persistent volume size (1Ti) for the MinIO instance. It uses the `--set` flag to override default chart values, specifically for the `persistence.size` parameter. ```bash $ helm install --name my-release --set persistence.size=1Ti minio/minio ``` -------------------------------- ### MinIO Helm Chart Bucket Configuration Parameters Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Defines the configuration parameters available for specifying MinIO buckets during Helm chart installation. These parameters control the bucket's name, access policy, and whether it should be purged if it already exists. ```APIDOC Bucket Configuration Parameters: buckets[]: name: Type: string Description: Name of the bucket to create. Must be a string with length > 0. policy: Type: string (enum) Description: Access policy for the bucket. Allowed Values: none, download, upload, public purge: Type: boolean Description: If true, purges the bucket if it already exists. ``` -------------------------------- ### Deploy Milvus Cluster Mode with Default Configuration Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus in cluster mode using the default Pulsar message queue. This is the standard deployment command for a Milvus cluster. ```bash helm upgrade --install my-release milvus/milvus ``` -------------------------------- ### Configure node selector for Milvus Standalone deployment Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet demonstrates setting a node selector for the Milvus Standalone deployment. It schedules the standalone instance on nodes labeled with 'deployment: standalone', useful for single-node or development deployments. ```yaml standalone: # Milvus standalone will be scheduled on nodes with deployment=standalone label nodeSelector: deployment: standalone ``` -------------------------------- ### Deploy Milvus Cluster Mode with Kafka Message Queue Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Installs Milvus in cluster mode, configuring Kafka as the message queue instead of the default Pulsar. This requires disabling `pulsarv3` and enabling `kafka`. ```bash helm upgrade --install my-release milvus/milvus --set pulsarv3.enabled=false --set kafka.enabled=true ``` -------------------------------- ### Configure MinIO Dependency Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define specific tolerations for the MinIO dependency pods used by Milvus, allowing them to schedule on nodes with particular taints. ```yaml minio: tolerations: [] ``` -------------------------------- ### Enable Milvus Proxy TLS via Helm CLI --set Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Shows how to enable TLS for the Milvus proxy directly from the command line using Helm's '--set' flags. This method allows providing base64-encoded certificate and key paths during installation or upgrade. ```bash --set proxy.tls.enabled=true \ --set prox.tls.key=$(cat /path/to/private_key_file | base64 -w 0) \ --set prox.tls.crt=$(cat /path/to/certificate_file | base64 -w 0) ``` -------------------------------- ### Configure Etcd Dependency Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define specific tolerations for the Etcd dependency pods used by Milvus, allowing them to schedule on nodes with particular taints. ```yaml etcd: tolerations: [] ``` -------------------------------- ### Configure node selector for Etcd dependency Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet demonstrates setting a node selector for the Etcd cluster dependency. It schedules Etcd on nodes with 'component: etcd' and 'storage: fast' labels, ensuring high-speed storage for the metadata store. ```yaml etcd: # Etcd will be scheduled on nodes with component=etcd and storage=fast label nodeSelector: component: etcd storage: fast ``` -------------------------------- ### Enable File Logging for Milvus Helm Deployment Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Shows how to install a Milvus cluster with persistent file logging enabled. This requires setting 'log.persistence.enabled' to true and specifying a storage class with 'ReadWriteMany' access modes. Logs will be output to the '/milvus/logs/' directory. ```bash helm install my-release milvus/milvus --set log.persistence.enabled=true --set log.persistence.persistentVolumeClaim.storageClass= ``` -------------------------------- ### Milvus Query Node Affinity Configuration Template Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules specifically for the Milvus Query Node component. These settings override any global affinity configurations for the query node. ```yaml queryNode: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Milvus Mix Coordinator Affinity Configuration Template Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules for the Milvus Mix Coordinator, recommended for cluster mode. These settings override any global affinity configurations for the mix coordinator. ```yaml mixCoordinator: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Configure node selector for MinIO dependency Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet shows how to set a node selector for the MinIO dependency used by Milvus. It schedules MinIO on nodes with 'storage: high-performance' and 'component: storage' labels, optimizing storage performance for object storage. ```yaml minio: # MinIO will be scheduled on nodes with storage=high-performance label nodeSelector: storage: high-performance component: storage ``` -------------------------------- ### Configure MinIO Environment Variables via Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Demonstrates how to pass environment variables to MinIO containers during Helm chart deployment. Multiple variables can be set using the `environment.=` format within the `helm install --set` command. ```bash $ helm install --set environment.MINIO_BROWSER=on,environment.MINIO_DOMAIN=domain-name minio/minio ``` -------------------------------- ### Configure node selector for Milvus Query Node component Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet demonstrates setting a node selector for the Milvus Query Node. It schedules the query node on nodes with 'component: query' and 'gpu: true' labels, allowing for specialized hardware allocation for query processing. ```yaml queryNode: # Milvus query node will be scheduled on nodes with component=query and gpu=true label nodeSelector: component: query gpu: "true" ``` -------------------------------- ### Milvus Index Node Affinity Configuration Template Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md Template for configuring node, pod, and anti-affinity rules specifically for the Milvus Index Node component. These settings override any global affinity configurations for the index node. ```yaml indexNode: affinity: podAffinity: # ... podAntiAffinity: # ... nodeAffinity: # ... ``` -------------------------------- ### Configure node selector for Kafka Broker Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet demonstrates setting a node selector for the Kafka Broker component. It schedules Kafka on nodes with 'component: kafka' and 'storage: fast' labels, optimizing for high-throughput messaging and persistent storage. ```yaml kafka: # Kafka will be scheduled on nodes with component=kafka and storage=fast label nodeSelector: component: kafka storage: fast ``` -------------------------------- ### Enable TEI Service in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README-TEI.md This YAML configuration snippet shows the basic settings to enable the Text Embeddings Inference (TEI) service within the Milvus Helm Chart. It sets `enabled` to true and specifies the `modelId` for the embedding model to be used, providing a quick way to get started with TEI integration. ```yaml tei: enabled: true modelId: "BAAI/bge-large-en-v1.5" ``` -------------------------------- ### Test TEI Service Endpoint and Embedding Functionality Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/tei/README.md This Bash script provides commands to verify the proper functioning of a deployed Text Embeddings Inference (TEI) service. It first retrieves the service endpoint and then sends a POST request to test the text embedding functionality. ```bash # Get the TEI service endpoint export TEI_SERVICE=$(kubectl get svc -l component=text-embeddings-inference -o jsonpath='{.items[0].metadata.name}') # Test the embedding functionality kubectl run -it --rm curl --image=curlimages/curl -- curl -X POST "http://${TEI_SERVICE}:8080/embed" \ -H "Content-Type: application/json" \ -d '{"inputs":"This is a test text"}' ``` -------------------------------- ### Define Global SecurityContext in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/security-context-configuration-guide.md This snippet illustrates the basic structure for defining a global `securityContext` that applies to all Milvus components in a Helm chart. It serves as a placeholder, indicating where more detailed security configurations can be added to affect the entire Milvus deployment. ```yaml securityContext: {} ``` -------------------------------- ### Deploy MinIO NAS Gateway with Helm Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Commands to deploy MinIO in NAS gateway mode using Helm, including setting the initial number of instances and scaling them. ```bash helm install --set nasgateway.enabled=true minio/minio ``` ```bash helm install --set nasgateway.enabled=true,nasgateway.replicas=8 minio/minio ``` -------------------------------- ### Configure trustedCertsSecret via Helm --set Parameter Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md This command line argument demonstrates how to pass the name of the trusted certificates secret directly to Helm using the '--set' flag during installation or upgrade. This overrides any default or values file setting for 'trustedCertsSecret'. ```bash --set trustedCertsSecret=minio-trusted-certs ``` -------------------------------- ### Configure Minio Client (mc) Path Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/templates/_helper_create_bucket.txt This snippet sets up the `mc` (Minio Client) command, optionally using a custom configuration directory if `configPathmc` is provided via Helm values. It ensures the `mc` command is ready for subsequent operations. ```Shell {{- if .Values.configPathmc }} MC_CONFIG_DIR="{{ .Values.configPathmc }}" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" {{- else }} MC="/usr/bin/mc --insecure" {{- end }} ``` -------------------------------- ### Configure node selector for Milvus Mix Coordinator component Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet shows how to apply a node selector for the Milvus Mix Coordinator. It ensures the coordinator pod is scheduled on nodes labeled with 'component: coordinator', centralizing control plane components. ```yaml mixCoordinator: # Milvus mix coordinator will be scheduled on nodes with component=coordinator label nodeSelector: component: coordinator ``` -------------------------------- ### MinIO Configuration Parameters for Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Detailed configuration options for deploying and managing MinIO within the Milvus Helm chart, covering TLS, default bucket settings, bucket creation jobs, Prometheus update jobs, and S3 gateway settings. ```APIDOC Parameter: tls.enabled Description: Enable TLS for MinIO server Default: false Parameter: tls.certSecret Description: Kubernetes Secret with public.crt and private.key files. Default: "" Parameter: defaultBucket.enabled Description: If set to true, a bucket will be created after MinIO install Default: false Parameter: defaultBucket.name Description: Bucket name Default: bucket Parameter: defaultBucket.policy Description: Bucket policy Default: none Parameter: defaultBucket.purge Description: Purge the bucket if already exists Default: false Parameter: defaultBucket.versioning Description: Enable / Suspend versioning for bucket Default: nil Parameter: buckets Description: List of buckets to create after MinIO install Default: [] Parameter: makeBucketJob.annotations Description: Additional annotations for the Kubernetes Batch (make-bucket-job) Default: "" Parameter: makeBucketJob.podAnnotations Description: Additional annotations for the pods of the Kubernetes Batch (make-bucket-job) Default: "" Parameter: makeBucketJob.securityContext.enabled Description: Enable to run Kubernetes Batch (make-bucket-job) containers as non-root. Default: false Parameter: makeBucketJob.securityContext.runAsUser Description: User id of the user for the container Default: 1000 Parameter: makeBucketJob.securityContext.runAsGroup Description: Group id of the user for the container Default: 1000 Parameter: makeBucketJob.securityContext.fsGroup Description: Group id of the persistent volume mount for the container Default: 1000 Parameter: makeBucketJob.resources.requests.memory Description: Memory resource requests for 'make bucket' job Default: 128Mi Parameter: updatePrometheusJob.podAnnotations Description: Additional annotations for the pods of the Kubernetes Batch (update-prometheus-secret) Default: "" Parameter: updatePrometheusJob.securityContext.enabled Description: Enable to run Kubernetes Batch (update-prometheus-secret) containers as non-root. Default: false Parameter: updatePrometheusJob.securityContext.runAsUser Description: User id of the user for the container Default: 1000 Parameter: updatePrometheusJob.securityContext.runAsGroup Description: Group id of the user for the container Default: 1000 Parameter: updatePrometheusJob.securityContext.fsGroup Description: Group id of the persistent volume mount for the container Default: 1000 Parameter: s3gateway.enabled Description: Use MinIO as a s3 gateway Default: false Parameter: s3gateway.replicas Description: Number of s3 gateway instances to run in parallel Default: 4 ``` -------------------------------- ### Kubernetes Pod Anti-Affinity Configuration Example Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md This snippet shows a `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity rule. It prevents pods from being scheduled on nodes that already host pods with the `app=milvus` label, ensuring that Milvus pods are distributed across different nodes for high availability. ```yaml podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: # Must run on pods with app=milvus label - key: app operator: In values: - milvus topologyKey: "kubernetes.io/hostname" ``` -------------------------------- ### Configure node selector for Milvus Index Node component Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet illustrates how to define a node selector for the Milvus Index Node. It ensures the index node is scheduled on nodes specifically labeled with 'component: index', optimizing resource placement for index building. ```yaml indexNode: # Milvus index node will be scheduled on nodes with component=index label nodeSelector: component: index ``` -------------------------------- ### Configure node selector for Milvus Proxy component Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/node-selector-configuration-guide.md This YAML snippet shows how to apply a node selector specifically for the Milvus Proxy component. It ensures the proxy pod is scheduled on nodes labeled with 'component: proxy', overriding any global node selector settings for this component. ```yaml proxy: # Milvus proxy will be scheduled on nodes with component=proxy label nodeSelector: component: proxy ``` -------------------------------- ### Configure Etcd Pod Anti-Affinity for High Availability Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/affinity-configuration-guide.md This example demonstrates using pod anti-affinity to distribute etcd pods across different Kubernetes zones (`topology.kubernetes.io/zone`). It prevents multiple etcd pods from being scheduled on nodes within the same zone, enhancing high availability and fault tolerance. ```yaml etcd: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: # Avoid nodes that already have pods with app=etcd label - key: app operator: In values: - etcd topologyKey: "topology.kubernetes.io/zone" ``` -------------------------------- ### Prepare Values File for Milvus Standalone with Embedded ETCD and Local Storage Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md Creates a `values.yaml` file to configure Milvus standalone mode with an embedded ETCD and local storage, effectively disabling external ETCD, Pulsar, and MinIO dependencies. ```bash cat > values.yaml <` with the actual IP obtained from the previous step. ```bash ACCESS_KEY=$(kubectl get secret {{ template "minio.secretName" . }} --namespace {{ .Release.Namespace }} -o jsonpath="{.data.accesskey}" | base64 --decode) SECRET_KEY=$(kubectl get secret {{ template "minio.secretName" . }} --namespace {{ .Release.Namespace }} -o jsonpath="{.data.secretkey}" | base64 --decode) mc alias set {{ template "minio.fullname" . }} http://:{{ .Values.service.port }} "$ACCESS_KEY" "$SECRET_KEY" --api s3v4 mc ls {{ template "minio.fullname" . }} ``` -------------------------------- ### Define and Add TEI Text Embedding Function to Milvus Collection Schema (Python) Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/tei/README.md This snippet demonstrates how to create a Milvus collection schema that incorporates a Text Embedding Inference (TEI) function. It outlines the process of defining fields, configuring the `Function` object with TEI-specific parameters like provider and endpoint, and adding it to the schema before collection creation. This setup enables Milvus to automatically interact with a TEI service for text embedding. ```python from pymilvus import MilvusClient, DataType, Function, FunctionType # Connect to Milvus client = MilvusClient(uri="http://localhost:19530") # 1. Create schema schema = client.create_schema() # 2. Add fields schema.add_field("id", DataType.INT64, is_primary=True, auto_id=False) # Primary key schema.add_field("text", DataType.VARCHAR, max_length=65535) # Text field schema.add_field("embedding", DataType.FLOAT_VECTOR, dim=768) # Vector field, dimension must match TEI model output # 3. Define TEI embedding function tei_embedding_function = Function( name="tei_func", # Unique identifier for this embedding function function_type=FunctionType.TEXTEMBEDDING, # Indicates a text embedding function input_field_names=["text"], # Scalar field(s) containing text data to embed output_field_names=["embedding"], # Vector field(s) for storing embeddings params={ # TEI specific parameters "provider": "TEI", # Must be set to "TEI" "endpoint": "http://tei-service:8080", # TEI service address # Optional: "api_key": "your_secure_api_key", # Optional: "truncate": "true", # Optional: "truncation_direction": "right", # Optional: "max_client_batch_size": 64, # Optional: "ingestion_prompt": "passage: ", # Optional: "search_prompt": "query: " } ) schema.add_function(tei_embedding_function) # 4. Create collection with schema and index param index_params = client.prepare_index_params() index_params.add_index( field_name="embedding", index_name="embedding_index", index_type="HNSW", metric_type="COSINE" ) client.create_collection( name="test_collection", schema=schema, index_params=index_params ) client.load_collection( collection_name="test_collection" ) ``` -------------------------------- ### MinIO Helm Chart Configuration Parameters Reference Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Detailed reference for all configurable parameters available for the MinIO component when deploying Milvus using its Helm chart. Each parameter includes its purpose, inferred type, and default value. ```APIDOC MinIO Helm Chart Configuration Parameters: ingress.labels: description: Ingress labels type: object default: "{}" ingress.annotations: description: Ingress annotations type: object default: "{}" ingress.hosts: description: Ingress accepted hostnames type: array default: "[]" ingress.tls: description: Ingress TLS configuration type: array default: "[]" trustedCertsSecret: description: Kubernetes secret with trusted certificates to be mounted on {{ .Values.certsPath }}/CAs type: string default: "" mode: description: MinIO server mode type: string enum: [standalone, distributed] default: "standalone" extraArgs: description: Additional command line arguments to pass to the MinIO server type: array default: "[]" replicas: description: Number of nodes (applicable only for MinIO distributed mode). type: integer default: "4" zones: description: Number of zones (applicable only for MinIO distributed mode). type: integer default: "1" drivesPerNode: description: Number of drives per node (applicable only for MinIO distributed mode). type: integer default: "1" existingSecret: description: Name of existing secret with access and secret key. type: string default: "" accessKey: description: Default access key (5 to 20 characters) type: string default: "random 20 chars" secretKey: description: Default secret key (8 to 40 characters) type: string default: "random 40 chars" certsPath: description: Default certs path location type: string default: "/etc/minio/certs" configPathmc: description: Default config file location for MinIO client - mc type: string default: "/etc/minio/mc" mountPath: description: Default mount location for persistent drive type: string default: "/export" bucketRoot: description: Directory from where minio should serve buckets. type: string default: "Value of .mountPath" clusterDomain: description: domain name of kubernetes cluster where pod is running. type: string default: "cluster.local" service.type: description: Kubernetes service type type: string default: "ClusterIP" service.port: description: Kubernetes port where service is exposed type: integer default: "9000" service.externalIPs: description: service external IP addresses type: array default: "nil" service.annotations: description: Service annotations type: object default: "{}" ``` -------------------------------- ### Milvus Helm Chart Values Reference Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md A detailed reference of all configurable parameters for the Milvus Helm chart, including their purpose and default values, allowing customization of deployment behavior. ```APIDOC serviceAccount.create: Description: Toggle creation of new service account Default: true serviceAccount.name: Description: Name of service account to create and/or use Default: "" persistence.enabled: Description: Use persistent volume to store data Default: true persistence.annotations: Description: PVC annotations Default: {} persistence.size: Description: Size of persistent volume claim Default: 500Gi persistence.existingClaim: Description: Use an existing PVC to persist data Default: nil persistence.storageClass: Description: Storage class name of PVC Default: nil persistence.accessMode: Description: ReadWriteOnce or ReadOnly Default: ReadWriteOnce persistence.subPath: Description: Mount a sub directory of the persistent volume if set Default: "" resources.requests.memory: Description: Memory resource requests Default: 4Gi priorityClassName: Description: Pod priority settings Default: "" securityContext.enabled: Description: Enable to run containers as non-root. NOTE: if persistence.enabled=false then securityContext will be automatically disabled Default: true securityContext.runAsUser: Description: User id of the user for the container Default: 1000 securityContext.runAsGroup: Description: Group id of the user for the container Default: 1000 securityContext.fsGroup: Description: Group id of the persistent volume mount for the container Default: 1000 nodeSelector: Description: Node labels for pod assignment Default: {} affinity: Description: Affinity settings for pod assignment Default: {} tolerations: Description: Toleration labels for pod assignment Default: [] additionalLabels: Description: Additional labels for Deployment in standalone mode or StatefulSet in distributed mode Default: [] additionalAnnotations: Description: Additional annotations for Deployment in standalone mode or StatefulSet in distributed mode Default: [] podAnnotations: Description: Pod annotations Default: {} podLabels: Description: Pod Labels Default: {} ``` -------------------------------- ### Milvus Root Coordinator Configuration Parameters Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/milvus/README.md This section details the configurable parameters for the Milvus Root Coordinator component, including settings for resources, node assignment, service exposure, and deployment strategies. Each parameter is listed with its description and default value. ```APIDOC Parameter: rootCoordinator.enabled Description: Enable or disable Milvus Root Coordinator component Default: false Parameter: rootCoordinator.resources Description: Resource requests/limits for the Milvus Root Coordinator pods Default: {} Parameter: rootCoordinator.nodeSelector Description: Node labels for Milvus Root Coordinator pods assignment Default: {} Parameter: rootCoordinator.affinity Description: Affinity settings for Milvus Root Coordinator pods assignment Default: {} Parameter: rootCoordinator.tolerations Description: Toleration labels for Milvus Root Coordinator pods assignment Default: [] Parameter: rootCoordinator.heaptrack.enabled Description: Whether to enable heaptrack Default: false Parameter: rootCoordinator.profiling.enabled Description: Whether to enable live profiling Default: false Parameter: rootCoordinator.activeStandby.enabled Description: Whether to enable active-standby Default: false Parameter: rootCoordinator.extraEnv Description: Additional Milvus Root Coordinator container environment variables Default: [] Parameter: rootCoordinator.service.type Description: Service type Default: ClusterIP Parameter: rootCoordinator.service.port Description: Port where service is exposed Default: 19530 Parameter: rootCoordinator.service.annotations Description: Service annotations Default: {} Parameter: rootCoordinator.service.labels Description: Service custom labels Default: {} Parameter: rootCoordinator.service.clusterIP Description: Internal cluster service IP Default: unset Parameter: rootCoordinator.service.loadBalancerIP Description: IP address to assign to load balancer (if supported) Default: unset Parameter: rootCoordinator.service.loadBalancerSourceRanges Description: List of IP CIDRs allowed access to lb (if supported) Default: [] Parameter: rootCoordinator.service.externalIPs Description: Service external IP addresses Default: [] Parameter: rootCoordinator.strategy Description: Deployment strategy configuration Default: RollingUpdate Parameter: rootCoordinator.annotations Description: Additional pod annotations Default: {} ``` -------------------------------- ### Manage MinIO Credentials with Existing Kubernetes Secrets Source: https://github.com/zilliztech/milvus-helm/blob/master/charts/minio/README.md Commands to create a generic Kubernetes secret containing MinIO access and secret keys, and then instruct the MinIO Helm chart to use this pre-existing secret for credentials. ```bash kubectl create secret generic my-minio-secret --from-literal=accesskey=foobarbaz --from-literal=secretkey=foobarbazqux ``` ```bash helm install --set existingSecret=my-minio-secret minio/minio ``` -------------------------------- ### Configure Kafka Dependency Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define specific tolerations for Kafka brokers and its ZooKeeper dependency when Kafka is used instead of Pulsar for Milvus. ```yaml kafka: tolerations: [] zookeeper: tolerations: [] ``` -------------------------------- ### Configure DataNode Component Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define component-specific tolerations for the Milvus DataNode. These settings will completely override any global tolerations configured for this component. ```yaml dataNode: tolerations: [] ``` -------------------------------- ### Configure IndexNode Component Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define component-specific tolerations for the Milvus IndexNode. These settings will completely override any global tolerations configured for this component. ```yaml indexNode: tolerations: [] ``` -------------------------------- ### Configure QueryNode Component Tolerations in Milvus Helm Chart Source: https://github.com/zilliztech/milvus-helm/blob/master/docs/tolerations-configuration-guide.md This snippet shows how to define component-specific tolerations for the Milvus QueryNode. These settings will completely override any global tolerations configured for this component. ```yaml queryNode: tolerations: [] ```