Kubeflow Pipelines SDK for Tekton

    You can use the KFP-Tekton SDK to compile, upload and run your Kubeflow Pipeline DSL Python scripts on a .

    The SDK is an extension to the Kubeflow Pipelines SDK adding the TektonCompiler and the TektonClient:

      • kfp_tekton.TektonClient.upload_pipeline uploads a local file to create a new pipeline in Kubeflow Pipelines.
      • kfp_tekton.TektonClient.create_experiment creates a pipeline and returns an experiment object.
      • kfp_tekton.TektonClient.create_run_from_pipeline_func compiles a pipeline function and submits it for execution on Kubeflow Pipelines.
      • kfp_tekton.TektonClient.create_run_from_pipeline_package runs a local pipeline package on Kubeflow Pipelines.

    You need Python 3.5 or later to use the Kubeflow Pipelines SDK for Tekton. We recommend to create a Python virtual environment first using Miniconda or a virtual environment manager such as virtualenv or the Python 3 venv module:

    You can install the latest release of the kfp-tekton compiler from :

    The kfp-tekton Python package comes with the dsl-compile-tekton command line executable, which should be available in your terminal shell environment after installing the Python package.

    Note: If the KFP DSL script contains a __main__ method calling the kfp_tekton.compiler.TektonCompiler.compile() function:

    The pipeline can then be compiled by running the DSL script with python3 directly from the command line, producing a Tekton YAML file pipeline.yaml in the same directory: