You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从MinIO URI获取数据?Minikube上Kubeflow Pipeline访问问题

Kubeflow Pipeline MinIO数据访问问题解决

问题背景

在Minikube上运行Kubeflow Pipeline时,组件间传递的输出数据自动存储到了MinIO中,但未找到MinIO相关密钥,默认minioadmin账号无法登录,需要获取MinIO中的数据。Pipeline定义如下:

import kfp
import kfp.components as comp
from kfp.components import load_component_from_file
example_component1_op = load_component_from_file("./pipelines/components/example_component1/example_component1.yaml")
example_component2_op = load_component_from_file("./pipelines/components/example_component2/example_component2.yaml")

@kfp.dsl.pipeline(name='example_pipeline_20220820')
def example_pipeline():
    example_component1_task = example_component1_op(
        input_1='/app/input.txt',
        input_2=8,
    )
    
    example_component2_task = example_component2_op(
        input_1=example_component1_task.outputs['output_1'],
        input_2=5,
    )

相关截图

  • 截图1
  • 截图2
  • 截图3

解决步骤

1. 查找MinIO密钥

Kubeflow默认将MinIO密钥存储在kubeflow命名空间下,执行以下命令查看:

kubectl get secrets -n kubeflow

通常对应的Secret名称为mlpipeline-minio-artifact。

2. 提取Access Key和Secret Key

通过以下命令解码密钥内容:

# 获取Access Key
kubectl get secret mlpipeline-minio-artifact -n kubeflow -o jsonpath='{.data.accesskey}' | base64 -d

# 获取Secret Key
kubectl get secret mlpipeline-minio-artifact -n kubeflow -o jsonpath='{.data.secretkey}' | base64 -d

3. 访问MinIO获取数据

方式一:通过Web UI访问

  1. 确保已端口转发MinIO服务:
kubectl port-forward service/minio-service -n kubeflow 9000:9000
  1. 打开http://localhost:9000,使用上面提取的Access Key和Secret Key登录。
  2. 数据默认存储在mlpipeline桶中,路径对应Pipeline运行ID、任务ID及组件输出路径,找到对应文件即可下载。

方式二:通过MinIO客户端(mc)访问

  1. 安装MinIO客户端mc,配置本地MinIO端点:
mc config host add minio-local http://localhost:9000 <提取的Access Key> <提取的Secret Key>
  1. 查看桶内数据结构:
mc ls minio-local/mlpipeline
  1. 下载指定文件到本地:
mc cp minio-local/mlpipeline/<具体文件路径> ./本地文件名

补充说明

Kubeflow Pipeline默认使用MinIO作为Artifact存储来实现组件间的数据传递,这是内置的默认配置,无需手动开启,因此数据会自动存储到MinIO中。

内容的提问来源于stack exchange,提问作者Ryo Matsuzaka

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.14 22:10:34