zilliztech / milvus-operator

The Kubernetes Operator of Milvus.
https://milvus.io
Apache License 2.0
33 stars 20 forks source link

No proxy pods created after the milvus installed #48

Closed yuzs2 closed 7 months ago

yuzs2 commented 7 months ago

Hi, I installed milvus-operator in my k8s cluster and created a standalone milvus using it. (see https://github.com/zilliztech/milvus-operator/issues/45)

apiVersion: milvus.io/v1beta1
kind: Milvus
metadata:
  name: milvus-sample
spec:
  mode: standalone
  components:
    image: dockerhub-proxy-cache/milvusdb/milvus:v2.3.2
  dependencies:
    etcd:
      inCluster:
        values:
          image:
            repository: dockerhub-proxy-cache/milvusdb/etcd
            tag: 3.5.5-r2
          persistence:
            storageClass: 0ca80e0142e3953fd9
            size: 100Mi
    storage:
      inCluster:
        values: 
          image:
            repository: dockerhub-proxy-cache/minio/minio
            tag: RELEASE.2023-03-20T20-16-18Z
          persistence:
            storageClass: 0ca80e0142e3953fd9
            size: 100Mi
  config: {} 

However, after the installation, there is no proxy pod created, and I'm unable to connect to the milvus following the doc: https://milvus.io/docs/install_standalone-operator.md#Connect-to-Milvus

➭ kubectl get milvus,pods,jobs,svc,pvc                                           
NAME                             MODE         STATUS    UPDATED   AGE
milvus.milvus.io/milvus-sample   standalone   Healthy   True      2d19h

NAME                                                   READY   STATUS    RESTARTS   AGE
pod/milvus-sample-etcd-0                               1/1     Running   0          2d19h
pod/milvus-sample-milvus-standalone-57d7d74c5c-pjtm6   1/1     Running   0          2d19h
pod/milvus-sample-minio-79b74bb9b6-gw89w               1/1     Running   0          2d19h

NAME                                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)              AGE
service/milvus-sample-etcd            ClusterIP   172.21.237.185   <none>        2379/TCP,2380/TCP    2d19h
service/milvus-sample-etcd-headless   ClusterIP   None             <none>        2379/TCP,2380/TCP    2d19h
service/milvus-sample-milvus          ClusterIP   172.21.43.150    <none>        19530/TCP,9091/TCP   2d19h
service/milvus-sample-minio           ClusterIP   172.21.32.78     <none>        9000/TCP             2d19h

NAME                                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                       AGE
persistentvolumeclaim/data-milvus-sample-etcd-0   Bound    pvc-3878651c-414b-4e1f-a5bb-302b9f9ffbdb   100Mi      RWO            0ca80e0142e3953fd9   2d19h
persistentvolumeclaim/milvus-sample-minio         Bound    pvc-813cbbfb-b618-43f3-b9e2-c429db68a7a5   100Mi      RWO            0ca80e0142e3953fd9   2d19h

When using the port-forwarding nothing will be shown in the 0.0.0.0:19530

➭ kubectl port-forward --address 0.0.0.0 service/milvus-sample-milvus 27017:19530
Forwarding from 0.0.0.0:27017 -> 19530

How can I confirm whether the installation is successful? Could you please help? Thanks!

haorenfsa commented 7 months ago

Em... You mean you failed to connect to the port 27017?

yuzs2 commented 7 months ago

@haorenfsa Sorry it was a typo. Basically I failed to connect to port 19350. I used the below code to test the connection and it failed to connect.

c, err := client.NewClient(ctx, client.Config{
        Address: 0.0.0.0:19530,
    })
    if err != nil {
        // handling error and exit, to make example simple here
        log.Fatal("failed to connect to milvus:", err.Error())
    }
➭ go run conn.go
2023/11/20 16:36:50 failed to connect to milvus:context deadline exceeded
exit status 1

But yes I was port forwarding 27017 to 19530, because I was trying to follow the doc: https://milvus.io/docs/install_standalone-operator.md#Connect-to-Milvus

I'm also confused because I don't have the proxy pods created and I don't see anything in the backend of 27017.

Could you please let me know what components (pods, service, etc) are supposed to be created for the standalone milvus, and how can I confirm if the milvus is ready for use? I'm new to Milvus, so I appreciate your patience with my basic questions. Thank you.

haorenfsa commented 7 months ago

Your milvus's runing in this pod pod/milvus-sample-milvus-standalone-57d7d74c5c-pjtm6. And it listens to 19530 in that pod. When you use kubectl port-forward, it opens a random port (in your case 27017), which forwards net packets to 19530 port of milvus. so in your code the Address should be 19530.

yuzs2 commented 7 months ago

Thanks for the help @haorenfsa. It resolved.