首页 > 解决方案 > 当文件上传到 GCP 存储桶(Kubeflow 1.3 多用户)时,如何运行管道?

问题描述

我收到以下错误:

“无法使用 API 资源引用进行授权:无法使用 API 资源引用进行授权:PermissionDenied:用户 'myServiceAccount@appspot.gserviceaccount.com' 未获得授权,原因是:(请求:ResourceAttributes{Namespace:namespace1,Verb:list,Group: pipelines.kubeflow.org,版本:v1beta1,资源:实验,子资源:,名称:,

代码

def main(data, context):
  client = kfp.Client(host=HOST, client_id=CLIENT_ID,namespace=NAMESPACE)
  logging.info(client.list_experiments(namespace=NAMESPACE))

标签: google-cloud-platformgoogle-cloud-storagekubeflowkubeflow-pipelines

解决方案


Now my GCP function is able to list pipelines.

I had to use the following service account: KF-NAME-user@KF-PROJECT.iam.gserviceaccount.com .

This message appears in the logs but it's just a warning message No such file or directory: '/var/run/secrets/kubernetes.io/serviceaccount/namespace'


推荐阅读