Access Kubeflow Pipelines from Pod

This guide contains instructions to access Kubeflow Pipelines (KFP) in your Kubeflow deployment from a Pod in the same cluster.

There are two ways to access Kubeflow Pipelines:

  • Using the KFP Software Development Kit (SDK)
  • Using the KFP Command Line Interface (CLI)

What You’ll Need

Procedure

Choose one of the following options, based on how you want to access KFP.

  1. Create a notebook server and enable the configuration that allows access to Kubeflow Pipelines.

    ../../../_images/allow-kfp-access.png
  2. Start a Python kernel or a Jupyter notebook and create a new KFP Client:

    import kfp client = kfp.Client() # When in-cluster, the client automatically sets the requests' # namespace to the pod's namespace
  3. Use the client to perform all the CRUD operations supported by the REST API. For example:

    client.list_experiments() client.create_experiment(name="test") client.get_experiment(experiment_id="<id>") client.list_pipelines() client.run_pipeline(experiment_id="<id>", pipeline_id="<id>") client.list_runs() client.list_recurring_runs()

See also

  • Find all the functions that Client implements by navigating to the source repository.
  1. Create a notebook server and enable the configuration that allows access to Kubeflow Pipelines.

    ../../../_images/allow-kfp-access.png
  2. Use the kfp CLI to interact with the KFP API server:

    jovyan@mynotebook-0:~$ kfp run list
    jovyan@mynotebook-0:~$ kfp experiment list

    See also

Note

The CLI utility allows you to use with the pipeline, experiment, and run CRUD APIs.

Run kfp --help or kfp <command> --help for more information. For example:

jovyan@mynotebook-0:~$ kfp pipeline --help

Summary

You have successfully accessed KFP from a Pod in the same cluster.

What’s Next

Check out the rest of the documentation regarding KFP.