我想连接到我部署在Google引擎上的一个Milvus数据库。
我在脚本的最后一行中遇到了一个错误。我正在本地运行脚本。
下面是我设置GKE集群的过程:(https://milvus.io/docs/v2.0.0/gcp.md)
这是我画的类似的问题
对我错过了什么有什么想法吗?
import os
from pymilvus import connections
from kubernetes import client, config
My_Kubernetes_IP = 'XX.XXX.XX.XX'
# Authenticate with GCP credentials
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = os.path.abspath('credentials.json')
# load milvus config file and connect to GKE instance
config = client.Configuration(os.path.abspath('milvus/config.yaml'))
config.host = f'https://{My_Kubernetes_IP}:19530'
client.Configuration.set_default(config)
## connect to milvus
milvus_ip = 'xx.xxx.xx.xx'
connections.connect(host=milvus_ip, port= '19530')错误:
BaseException:
发布于 2022-03-25 03:32:13
如果希望通过k8s集群通过ip+port连接到Milvus,则可能需要将本地端口19530转发到Milvus服务。使用如下命令:
$ kubectl港口转发服务/我-释放-milvus 19530
发布于 2022-03-27 13:30:52
你检查过你的milvus外部IP在哪里了吗?
按照文档中的说明,您应该使用kubectl get services来检查为milvus分配了哪个外部IP。
https://stackoverflow.com/questions/70875784
复制相似问题