helm部署Milvus集群
1.需要创建pv,我采用的是local 类型的pv,所有nodeAffinity values值根据自己情况修改
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-etcd-0 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/etcd-data claimRef: name: data-milvus-etcd-0 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-180 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-etcd-1 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/etcd-data claimRef: name: data-milvus-etcd-1 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-236 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-etcd-2 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/etcd-data claimRef: name: data-milvus-etcd-2 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-29
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-minio-0 spec: capacity: storage: 800Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/minio claimRef: name: export-milvus-minio-0 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-137 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-minio-1 spec: capacity: storage: 800Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/minio claimRef: name: export-milvus-minio-1 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-81 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-minio-2 spec: capacity: storage: 800Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/minio claimRef: name: export-milvus-minio-2 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-101-27 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-minio-3 spec: capacity: storage: 800Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/minio claimRef: name: export-milvus-minio-3 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-101-104
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-journal-milvus-pulsar-0 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/journal-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-journal-milvus-pulsar-bookie-0 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-137 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-journal-milvus-pulsar-1 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/journal-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-journal-milvus-pulsar-bookie-1 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-81 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-journal-milvus-pulsar-2 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/journal-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-journal-milvus-pulsar-bookie-2 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-101-27
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-ledgers-milvus-pulsar-0 spec: capacity: storage: 200Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/ledgers-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-ledgers-milvus-pulsar-bookie-0 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-137 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-ledgers-milvus-pulsar-1 spec: capacity: storage: 200Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/ledgers-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-ledgers-milvus-pulsar-bookie-1 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-1-81 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-ledgers-milvus-pulsar-2 spec: capacity: storage: 200Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data1/milvus/ledgers-milvus-pulsar-data claimRef: name: milvus-pulsar-bookie-ledgers-milvus-pulsar-bookie-2 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-8-101-27
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-zk-0 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/zk-data claimRef: name: milvus-pulsar-zookeeper-data-milvus-pulsar-zookeeper-0 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-180 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-zk-1 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/zk-data claimRef: name: milvus-pulsar-zookeeper-data-milvus-pulsar-zookeeper-1 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-236 --- apiVersion: v1 kind: PersistentVolume metadata: name: data-my-release-zk-2 spec: capacity: storage: 100Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: "" local: path: /data/zjy/milvus/zk-data claimRef: name: milvus-pulsar-zookeeper-data-milvus-pulsar-zookeeper-2 namespace: default nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 10-7-73-37
2.启动Milvus
创建pv #kubectl apply -f . 添加repo helm repo add milvus https://milvus-io.github.io/milvus-helm/ 启动milvus helm install -f milvus-values.yaml milvus milvus/milvus
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
dataNode: replicas: 6 indexNode: replicas: 6 queryNode: replicas: 6 log: level: info