Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

Minimal permissions to submit a kubeflow pipeline

Issue

I am trying to figure out what the minimum permissions are to run the following code:

    pipeline = Pipeline(...)
    client = kfp.Client(host=...)
    client.create_run_from_pipeline_func(
        pipeline.build(),
        experiment_name=...,
        run_name=...,
        arguments={...},
    )

Right now, I am getting this error:

Traceback (most recent call last):
  File "main.py", line 122, in <module>
    Fire()
  File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 468, in _Fire
    target=component.__name__)
  File "/usr/local/lib/python3.7/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "main.py", line 32, in run
    arguments={...},
  File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 566, in create_run_from_pipeline_func
    return self.create_run_from_pipeline_package(pipeline_package_path, arguments, run_name, experiment_name, namespace)
  File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 606, in create_run_from_pipeline_package
    experiment = self.create_experiment(name=experiment_name, namespace=namespace)
  File "/usr/local/lib/python3.7/site-packages/kfp/_client.py", line 307, in create_experiment
    experiment = self._experiment_api.create_experiment(body=experiment)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api/experiment_service_api.py", line 201, in create_experiment
    return self.create_experiment_with_http_info(body, **kwargs)  # noqa: E501
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api/experiment_service_api.py", line 299, in create_experiment_with_http_info
    collection_formats=collection_formats)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 383, in call_api
    _preload_content, _request_timeout, _host)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 202, in __call_api
    raise e
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 199, in __call_api
    _request_timeout=_request_timeout)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/api_client.py", line 427, in request
    body=body)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/rest.py", line 285, in POST
    body=body)
  File "/usr/local/lib/python3.7/site-packages/kfp_server_api/rest.py", line 238, in request
    raise ApiException(http_resp=r)
kfp_server_api.exceptions.ApiException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Content-Length': '1452', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Thu, 28 Jan 2021 22:00:00 GMT', 'Vary': 'Origin', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'X-Xss-Protection': '0', 'Set-Cookie': 'S=cloud_datalab_tunnel=IlqqPSpNPYnCEXgK8tKJWIU8pWOUhO8xcOC9JxvQPmc; Path=/; Max-Age=3600'})
HTTP response body:
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 401 (Unauthorized)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>401.</b> <ins>That’s an error.</ins>
  <p>  <ins>That’s all we know.</ins>

Environment Setup

enter image description here

NOTES:

  • I am running both the create_run_from_pipeline_func code and the kubeflow instance inside the cluster.
  • If I give the prediction-kubeflow the Owner role, everything works

Questions:

  • What are the minimal permissions I need to give the service account to get this working?
  • How should I be debugging this? Is there somewhere I can look to get more info on that 401 error?
question from:https://stackoverflow.com/questions/65946103/minimal-permissions-to-submit-a-kubeflow-pipeline

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...