$ tkn
This section lists the basic tkn
CLI commands.
Delete a pipeline.
$ tkn pipeline delete <pipeline_name> -n <namespace_name>
Describe a pipeline.
$ tkn pipeline describe <pipeline_name>
Cancel a pipeline run.
$ tkn pipelinerun cancel <pipeline_run_name> -n <namespace_name>
Delete a pipeline run.
$ tkn pipelinerun delete <pipeline_run_name_1> <pipeline_run_name_2> -n <namespace_name>
$ tkn pipelinerun delete -n <namespace_name> --keep 5 (1)
1 | Replace 5 with the number of most recently executed pipeline runs you want to retain. |
$ tkn pipelinerun delete --all
Starting with Red Hat OpenShift Pipelines 1.6, the |
Describe a pipeline run.
$ tkn pipelinerun describe <pipeline_run_name> -n <namespace_name>
Delete a task.
$ tkn task delete <task_name_1> <task_name_2> -n <namespace_name>
Describe a task.
$ tkn task describe <task_name> -n <namespace_name>
Cancel a task run.
$ tkn taskrun cancel <task_run_name> -n <namespace_name>
Delete a TaskRun.
$ tkn taskrun delete <task_run_name_1> <task_run_name_2> -n <namespace_name>
$ tkn taskrun delete -n <namespace_name> --keep 5 (1)
1 | Replace 5 with the number of most recently executed task runs you want to retain. |
Describe a task run.
$ tkn taskrun describe <task_run_name> -n <namespace_name>
Create a Pipeline Resource.
$ tkn resource create -n myspace
This is an interactive command that asks for input on the name of the Resource, type of the Resource, and the values based on the type of the Resource.
Delete a Pipeline Resource.
myresource
Pipeline Resource from a namespace$ tkn resource delete myresource -n myspace
Delete an EventListener.
mylistener1
and mylistener2
EventListeners in a namespace$ tkn eventlistener delete mylistener1 mylistener2 -n myspace
Describe an EventListener.
mylistener
EventListener in a namespace$ tkn eventlistener describe mylistener -n myspace
List EventListeners.
$ tkn eventlistener list -n myspace
Display logs of an EventListener.
mylistener
EventListener in a namespace$ tkn eventlistener logs mylistener -n myspace
Manage TriggerBindings.
$ tkn triggerbinding -h
Delete a TriggerBinding.
mybinding1
and mybinding2
TriggerBindings in a namespace$ tkn triggerbinding delete mybinding1 mybinding2 -n myspace
Describe a TriggerBinding.
mybinding
TriggerBinding in a namespace$ tkn triggerbinding describe mybinding -n myspace
List TriggerBindings.
$ tkn triggerbinding list -n myspace
Manage TriggerTemplates.
$ tkn triggertemplate -h
Delete a TriggerTemplate.
mytemplate1
and mytemplate2
TriggerTemplates in a namespace$ tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace`
Describe a TriggerTemplate.
mytemplate
TriggerTemplate in a namespace$ tkn triggertemplate describe mytemplate -n `myspace`
List TriggerTemplates.
$ tkn triggertemplate list -n myspace
Manage ClusterTriggerBindings.
$ tkn clustertriggerbinding -h
Delete a ClusterTriggerBinding.
myclusterbinding1
and myclusterbinding2
ClusterTriggerBindings$ tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2
Interact with Tekton Hub for resources such as tasks and pipelines.
Interact with hub.
$ tkn hub -h
$ tkn hub --api-server https://api.hub.tekton.dev
For each example, to get the corresponding sub-commands and flags, run |
Downgrade an installed resource.
mytask
task in the mynamespace
namespace to it’s older version$ tkn hub downgrade task mytask --to version -n mynamespace
Get a resource manifest by its name, kind, catalog, and version.
myresource
pipeline or task from the tekton
catalog$ tkn hub get [pipeline | task] myresource --from tekton --version version
Display information about a resource by its name, kind, catalog, and version.
mytask
task from the tekton
catalog$ tkn hub info task mytask --from tekton --version version
Install a resource from a catalog by its kind, name, and version.
mytask
task from the tekton
catalog in the mynamespace
namespace$ tkn hub install task mytask --from tekton --version version -n mynamespace
Reinstall a resource by its kind and name.
mytask
task from the tekton
catalog in the mynamespace
namespace$ tkn hub reinstall task mytask --from tekton --version version -n mynamespace