thon file_that_runs_a_zenml_pipeline.py

Tekton UITekton comes with its own UI that you can use to find further details about your pipeline runs, such as the logs of your steps.

To find the Tekton UI endpoint, we can use the following command:

kubectl get ingress -n tekton-pipelines  -o jsonpath='{.items[0].spec.rules[0].host}'

Additional configuration

For additional configuration of the Tekton orchestrator, you can pass TektonOrchestratorSettings which allows you to configure node selectors, affinity, and tolerations to apply to the Kubernetes Pods running your pipeline. These can be either specified using the Kubernetes model objects or as dictionaries.

from zenml.integrations.tekton.flavors.tekton_orchestrator_flavor import TektonOrchestratorSettings

from kubernetes.client.models import V1Toleration

tekton_settings = TektonOrchestratorSettings(

pod_settings={

"affinity": {

"nodeAffinity": {

"requiredDuringSchedulingIgnoredDuringExecution": {

"nodeSelectorTerms": [

"matchExpressions": [

"key": "node.kubernetes.io/name",

"operator": "In",

"values": ["my_powerful_node_group"],

},

"tolerations": [

V1Toleration(

key="node.kubernetes.io/name",

operator="Equal",

value="",

effect="NoSchedule"

If your pipelines steps have certain hardware requirements, you can specify them as ResourceSettings:

resource_settings = ResourceSettings(cpu_count=8, memory="16GB")

These settings can then be specified on either pipeline-level or step-level:

# Either specify on pipeline-level

@pipeline(

settings={

"orchestrator.tekton": tekton_settings,

"resources": resource_settings,

def my_pipeline():

...

# OR specify settings on step-level

@step(

settings={

"orchestrator.tekton": tekton_settings,

"resources": resource_settings,

def my_step():

...

Check out the SDK docs for a full list of available attributes and this docs page for more information on how to specify settings.

For more information and a full list of configurable attributes of the Tekton orchestrator, check out the SDK Docs .