Chapter 3. OpenShift Pipelines tkn reference This section lists the basic tkn CLI commands. 3.1. Basic syntax tkn [command or options] [arguments... ] 3.2. Global options --help, -h 3.3. Utility commands 3.3.1. tkn Parent command for tkn CLI. Example: Display all options USD tkn 3.3.2. completion [shell] Print shell completion code which must be evaluated to provide interactive completion. Supported shells are bash and zsh . Example: Completion code for bash shell USD tkn completion bash 3.3.3. version Print version information of the tkn CLI. Example: Check the tkn version USD tkn version 3.4. Pipelines management commands 3.4.1. pipeline Manage pipelines. Example: Display help USD tkn pipeline --help 3.4.2. pipeline delete Delete a pipeline. Example: Delete a pipeline from a namespace USD tkn pipeline delete <pipeline_name> -n <namespace_name> 3.4.3. pipeline describe Describe a pipeline. Example: Describe a pipeline USD tkn pipeline describe <pipeline_name> 3.4.4. pipeline list Display a list of pipelines. Example: Display a list of pipelines USD tkn pipeline list 3.4.5. pipeline logs Display the logs for a specific pipeline. Example: Stream the live logs for a pipeline USD tkn pipeline logs -f <pipeline_name> 3.4.6. pipeline start Start a pipeline. Example: Start a pipeline USD tkn pipeline start <pipeline_name> 3.5. Pipeline run commands 3.5.1. pipelinerun Manage pipeline runs. Example: Display help USD tkn pipelinerun -h 3.5.2. pipelinerun cancel Cancel a pipeline run. Example: Cancel a pipeline run from a namespace USD tkn pipelinerun cancel <pipeline_run_name> -n <namespace_name> 3.5.3. pipelinerun delete Delete a pipeline run. Example: Delete pipeline runs from a namespace USD tkn pipelinerun delete <pipeline_run_name_1> <pipeline_run_name_2> -n <namespace_name> Example: Delete all pipeline runs from a namespace, except the five most recently executed pipeline runs USD 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. Example: Delete all pipelines USD tkn pipelinerun delete --all Note Starting with Red Hat OpenShift Pipelines 1.6, the tkn pipelinerun delete --all command does not delete any resources that are in the running state. 3.5.4. pipelinerun describe Describe a pipeline run. Example: Describe a pipeline run in a namespace USD tkn pipelinerun describe <pipeline_run_name> -n <namespace_name> 3.5.5. pipelinerun list List pipeline runs. Example: Display a list of pipeline runs in a namespace USD tkn pipelinerun list -n <namespace_name> 3.5.6. pipelinerun logs Display the logs of a pipeline run. Example: Display the logs of a pipeline run with all tasks and steps in a namespace USD tkn pipelinerun logs <pipeline_run_name> -a -n <namespace_name> 3.6. Task management commands 3.6.1. task Manage tasks. Example: Display help USD tkn task -h 3.6.2. task delete Delete a task. Example: Delete tasks from a namespace USD tkn task delete <task_name_1> <task_name_2> -n <namespace_name> 3.6.3. task describe Describe a task. Example: Describe a task in a namespace USD tkn task describe <task_name> -n <namespace_name> 3.6.4. task list List tasks. Example: List all the tasks in a namespace USD tkn task list -n <namespace_name> 3.6.5. task start Start a task. Example: Start a task in a namespace USD tkn task start <task_name> -s <service_account_name> -n <namespace_name> 3.7. Task run commands 3.7.1. taskrun Manage task runs. Example: Display help USD tkn taskrun -h 3.7.2. taskrun cancel Cancel a task run. Example: Cancel a task run from a namespace USD tkn taskrun cancel <task_run_name> -n <namespace_name> 3.7.3. taskrun delete Delete a TaskRun. Example: Delete task runs from a namespace USD tkn taskrun delete <task_run_name_1> <task_run_name_2> -n <namespace_name> Example: Delete all but the five most recently executed task runs from a namespace USD 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. 3.7.4. taskrun describe Describe a task run. Example: Describe a task run in a namespace USD tkn taskrun describe <task_run_name> -n <namespace_name> 3.7.5. taskrun list List task runs. Example: List all the task runs in a namespace USD tkn taskrun list -n <namespace_name> 3.7.6. taskrun logs Display task run logs. Example: Display live logs for a task run in a namespace USD tkn taskrun logs -f <task_run_name> -n <namespace_name> 3.8. Pipeline Resource management commands 3.8.1. resource Manage Pipeline Resources. Example: Display help USD tkn resource -h 3.8.2. resource create Create a Pipeline Resource. Example: Create a Pipeline Resource in a namespace USD 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. 3.8.3. resource delete Delete a Pipeline Resource. Example: Delete the myresource Pipeline Resource from a namespace USD tkn resource delete myresource -n myspace 3.8.4. resource describe Describe a Pipeline Resource. Example: Describe the myresource Pipeline Resource USD tkn resource describe myresource -n myspace 3.8.5. resource list List Pipeline Resources. Example: List all Pipeline Resources in a namespace USD tkn resource list -n myspace 3.9. Trigger management commands 3.9.1. eventlistener Manage EventListeners. Example: Display help USD tkn eventlistener -h 3.9.2. eventlistener delete Delete an EventListener. Example: Delete mylistener1 and mylistener2 EventListeners in a namespace USD tkn eventlistener delete mylistener1 mylistener2 -n myspace 3.9.3. eventlistener describe Describe an EventListener. Example: Describe the mylistener EventListener in a namespace USD tkn eventlistener describe mylistener -n myspace 3.9.4. eventlistener list List EventListeners. Example: List all the EventListeners in a namespace USD tkn eventlistener list -n myspace 3.9.5. eventlistener logs Display logs of an EventListener. Example: Display the logs of the mylistener EventListener in a namespace USD tkn eventlistener logs mylistener -n myspace 3.9.6. triggerbinding Manage TriggerBindings. Example: Display TriggerBindings help USD tkn triggerbinding -h 3.9.7. triggerbinding delete Delete a TriggerBinding. Example: Delete mybinding1 and mybinding2 TriggerBindings in a namespace USD tkn triggerbinding delete mybinding1 mybinding2 -n myspace 3.9.8. triggerbinding describe Describe a TriggerBinding. Example: Describe the mybinding TriggerBinding in a namespace USD tkn triggerbinding describe mybinding -n myspace 3.9.9. triggerbinding list List TriggerBindings. Example: List all the TriggerBindings in a namespace USD tkn triggerbinding list -n myspace 3.9.10. triggertemplate Manage TriggerTemplates. Example: Display TriggerTemplate help USD tkn triggertemplate -h 3.9.11. triggertemplate delete Delete a TriggerTemplate. Example: Delete mytemplate1 and mytemplate2 TriggerTemplates in a namespace USD tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace` 3.9.12. triggertemplate describe Describe a TriggerTemplate. Example: Describe the mytemplate TriggerTemplate in a namespace USD tkn triggertemplate describe mytemplate -n `myspace` 3.9.13. triggertemplate list List TriggerTemplates. Example: List all the TriggerTemplates in a namespace USD tkn triggertemplate list -n myspace 3.9.14. clustertriggerbinding Manage ClusterTriggerBindings. Example: Display ClusterTriggerBindings help USD tkn clustertriggerbinding -h 3.9.15. clustertriggerbinding delete Delete a ClusterTriggerBinding. Example: Delete myclusterbinding1 and myclusterbinding2 ClusterTriggerBindings USD tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2 3.9.16. clustertriggerbinding describe Describe a ClusterTriggerBinding. Example: Describe the myclusterbinding ClusterTriggerBinding USD tkn clustertriggerbinding describe myclusterbinding 3.9.17. clustertriggerbinding list List ClusterTriggerBindings. Example: List all ClusterTriggerBindings USD tkn clustertriggerbinding list 3.10. Hub interaction commands Interact with Tekton Hub for resources such as tasks and pipelines. 3.10.1. hub Interact with hub. Example: Display help USD tkn hub -h Example: Interact with a hub API server USD tkn hub --api-server https://api.hub.tekton.dev Note For each example, to get the corresponding sub-commands and flags, run tkn hub <command> --help . 3.10.2. hub downgrade Downgrade an installed resource. Example: Downgrade the mytask task in the mynamespace namespace to it's older version USD tkn hub downgrade task mytask --to version -n mynamespace 3.10.3. hub get Get a resource manifest by its name, kind, catalog, and version. Example: Get the manifest for a specific version of the myresource pipeline or task from the tekton catalog USD tkn hub get [pipeline | task] myresource --from tekton --version version 3.10.4. hub info Display information about a resource by its name, kind, catalog, and version. Example: Display information about a specific version of the mytask task from the tekton catalog USD tkn hub info task mytask --from tekton --version version 3.10.5. hub install Install a resource from a catalog by its kind, name, and version. Example: Install a specific version of the mytask task from the tekton catalog in the mynamespace namespace USD tkn hub install task mytask --from tekton --version version -n mynamespace 3.10.6. hub reinstall Reinstall a resource by its kind and name. Example: Reinstall a specific version of the mytask task from the tekton catalog in the mynamespace namespace USD tkn hub reinstall task mytask --from tekton --version version -n mynamespace 3.10.7. hub search Search a resource by a combination of name, kind, and tags. Example: Search a resource with a tag cli USD tkn hub search --tags cli 3.10.8. hub upgrade Upgrade an installed resource. Example: Upgrade the installed mytask task in the mynamespace namespace to a new version USD tkn hub upgrade task mytask --to version -n mynamespace

Commands:
tkn
tkn completion bash
tkn version
tkn pipeline --help
tkn pipeline delete <pipeline_name> -n <namespace_name>
tkn pipeline describe <pipeline_name>
tkn pipeline list
tkn pipeline logs -f <pipeline_name>
tkn pipeline start <pipeline_name>
tkn pipelinerun -h
tkn pipelinerun cancel <pipeline_run_name> -n <namespace_name>
tkn pipelinerun delete <pipeline_run_name_1> <pipeline_run_name_2> -n <namespace_name>
tkn pipelinerun delete -n <namespace_name> --keep 5 1
tkn pipelinerun delete --all
tkn pipelinerun describe <pipeline_run_name> -n <namespace_name>
tkn pipelinerun list -n <namespace_name>
tkn pipelinerun logs <pipeline_run_name> -a -n <namespace_name>
tkn task -h
tkn task delete <task_name_1> <task_name_2> -n <namespace_name>
tkn task describe <task_name> -n <namespace_name>
tkn task list -n <namespace_name>
tkn task start <task_name> -s <service_account_name> -n <namespace_name>
tkn taskrun -h
tkn taskrun cancel <task_run_name> -n <namespace_name>
tkn taskrun delete <task_run_name_1> <task_run_name_2> -n <namespace_name>
tkn taskrun delete -n <namespace_name> --keep 5 1
tkn taskrun describe <task_run_name> -n <namespace_name>
tkn taskrun list -n <namespace_name>
tkn taskrun logs -f <task_run_name> -n <namespace_name>
tkn resource -h
tkn resource create -n myspace
tkn resource delete myresource -n myspace
tkn resource describe myresource -n myspace
tkn resource list -n myspace
tkn eventlistener -h
tkn eventlistener delete mylistener1 mylistener2 -n myspace
tkn eventlistener describe mylistener -n myspace
tkn eventlistener list -n myspace
tkn eventlistener logs mylistener -n myspace
tkn triggerbinding -h
tkn triggerbinding delete mybinding1 mybinding2 -n myspace
tkn triggerbinding describe mybinding -n myspace
tkn triggerbinding list -n myspace
tkn triggertemplate -h
tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace`
tkn triggertemplate describe mytemplate -n `myspace`
tkn triggertemplate list -n myspace
tkn clustertriggerbinding -h
tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2
tkn clustertriggerbinding describe myclusterbinding
tkn clustertriggerbinding list
tkn hub -h
tkn hub --api-server https://api.hub.tekton.dev
tkn hub downgrade task mytask --to version -n mynamespace
tkn hub get [pipeline | task] myresource --from tekton --version version
tkn hub info task mytask --from tekton --version version
tkn hub install task mytask --from tekton --version version -n mynamespace
tkn hub reinstall task mytask --from tekton --version version -n mynamespace
tkn hub search --tags cli
tkn hub upgrade task mytask --to version -n mynamespace