【发布时间】:2022-03-27 21:30:52
【问题描述】:
我希望连接到我在 Google Kubernetes Engine 上部署的 Milvus database。
我在脚本的最后一行遇到了错误。我在本地运行脚本。
这是我设置 GKE 集群的过程:(https://milvus.io/docs/v2.0.0/gcp.md)
这里是a similar question我正在画画
对我缺少什么有什么想法吗?
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:
【问题讨论】:
标签: python authentication kubernetes google-cloud-platform google-kubernetes-engine