This section lists the basic tkn CLI commands.

Basic Syntax

tkn [command or options] [arguments…​]

Global Options

--help, -h

Utility commands

tkn

Parent command for tkn CLI.

Example: Display all options
$ tkn

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
$ tkn completion bash

version

Print version information of the tkn CLI.

Example: Check the tkn version
$ tkn version

Pipelines management commands

pipeline

Manage Pipelines.

Example: Display help
$ tkn pipeline --help

pipeline create

Create a Pipeline.

Example: Create a Pipeline defined by the mypipeline.yaml file in a namespace
$ tkn pipeline create -f mypipeline.yaml -n myspace

pipeline delete

Delete a Pipeline.

Example: Delete the mypipeline Pipeline from a namespace
$ tkn pipeline delete mypipeline -n myspace

pipeline describe

Describe a Pipeline.

Example: Describe mypipeline Pipeline
$ tkn pipeline describe mypipeline

pipeline list

List Pipelines.

Example: Display a list of Pipelines
$ tkn pipeline list

pipeline logs

Display Pipeline logs for a specific Pipeline.

Example: Stream live logs for the mypipeline Pipeline
$ tkn pipeline logs -f mypipeline

pipeline start

Start a Pipeline.

Example: Start mypipeline Pipeline
$ tkn pipeline start mypipeline

PipelineRun commands

pipelinerun

Manage PipelineRuns.

Example: Display help
$ tkn pipelinerun -h

pipelinerun cancel

Cancel a PipelineRun.

Example: Cancel the mypipelinerun PipelineRun from a namespace
$ tkn pipelinerun cancel mypipelinerun -n myspace

pipelinerun delete

Delete a PipelineRun.

Example: Delete PipelineRuns from a namespace
$ tkn pipelinerun delete mypipelinerun1 mypipelinerun2 -n myspace

pipelinerun describe

Describe a PipelineRun.

Example: Describe the mypipelinerun PipelineRun in a namespace
tkn pipelinerun describe mypipelinerun -n myspace

pipelinerun list

List PipelineRuns.

Example: Display a list of PipelineRuns in a namespace
$ tkn pipelinerun list -n myspace

pipelinerun logs

Display the logs of a PipelineRun.

Example: Display the logs of the mypipelinerun PipelineRun with all tasks and steps in a namespace
$ tkn pipelinerun logs mypipelinerun -a -n myspace

Task management commands

task

Manage Tasks.

Example: Display help
$ tkn task -h

task create

Create a Task.

Example: Create a Task defined by the mytask.yaml file in a namespace
$ tkn task create -f mytask.yaml -n myspace

task delete

Delete a Task.

Example: Delete mytask1 and mytask2 Tasks from a namespace
$ tkn task delete mytask1 mytask2 -n myspace

task describe

Describe a Task.

Example: Describe the mytask Task in a namespace
$ tkn task describe mytask -n myspace

task list

List Tasks.

Example: List all the Tasks in a namespace
$ tkn task list -n myspace

task logs

Display Task logs.

Example: Display logs for the mytaskrun TaskRun of the mytask Task
$ tkn task logs mytask mytaskrun -n myspace

task start

Start a Task.

Example: Start the mytask Task in a namespace
$ tkn task start mytask -s <ServiceAccountName> -n myspace

TaskRun commands

taskrun

Manage TaskRuns.

Example: Display help
$ tkn taskrun -h

taskrun cancel

Cancel a TaskRun.

Example: Cancel the mytaskrun TaskRun from a namespace
$ tkn taskrun cancel mytaskrun -n myspace

taskrun delete

Delete a TaskRun.

Example: Delete mytaskrun1 and mytaskrun2 TaskRuns from a namespace
$ tkn taskrun delete mytaskrun1 mytaskrun2 -n myspace

taskrun describe

Describe a TaskRun.

Example: Describe the mytaskrun TaskRun in a namespace
$ tkn taskrun describe mytaskrun -n myspace

taskrun list

List TaskRuns.

Example: List all TaskRuns in a namespace
$ tkn taskrun list -n myspace

taskrun logs

Display TaskRun logs.

Example: Display live logs for the mytaskrun TaskRun in a namespace
$ tkn taskrun logs -f mytaskrun -n myspace

Condition management commands

condition

Manage Conditions.

Example: Display help
$ tkn condition --help

condition delete

Delete a Condition.

Example: Delete the mycondition1 Condition from a namespace
$ tkn condition delete mycondition1 -n myspace

condition describe

Describe a Condition.

Example: Describe the mycondition1 Condition in a namespace
$ tkn condition describe mycondition1 -n myspace

condition list

List Conditions.

Example: List Conditions in a namespace
$ tkn condition list -n myspace

Pipeline Resource management commands

resource

Manage Pipeline Resources.

Example: Display help
$ tkn resource -h

resource create

Create a Pipeline Resource.

Example: Create Pipeline Resource defined by the myresource.yaml file in a namespace
$ tkn resource create -f myresource.yaml -n myspace

resource delete

Delete a Pipeline Resource.

Example: Delete the myresource Pipeline Resource from a namespace
$ tkn resource delete myresource -n myspace

resource describe

Describe a Pipeline Resource.

Example: Describe the myresource Pipeline Resource
$ tkn resource describe myresource -n myspace

resource list

List Pipeline Resources.

Example: List all Pipeline Resources in a namespace
$ tkn resource list -n myspace

ClusterTask management commands

clustertask

Manage ClusterTasks.

Example: Display help
$ tkn clustertask --help

clustertask delete

Delete a ClusterTask resource in a cluster.

Example: Delete mytask1 and mytask2 ClusterTasks
$ tkn clustertask delete mytask1 mytask2

clustertask describe

Describe a ClusterTask.

Example: Describe the mytask ClusterTask
$ tkn clustertask describe mytask1

clustertask list

List ClusterTasks.

Example: List ClusterTasks
$ tkn clustertask list

clustertask start

Start ClusterTasks.

Example: Start the mytask ClusterTask
$ tkn clustertask start mytask

Trigger management commands

eventlistener

Manage EventListeners.

Example: Display help
$ tkn eventlistener -h

eventlistener delete

Delete an EventListener.

Example: Delete mylistener1 and mylistener2 EventListeners in a namespace
$ tkn eventlistener delete mylistener1 mylistener2 -n myspace

eventlistener describe

Describe an EventListener.

Example: Describe the mylistener EventListener in a namespace
$ tkn eventlistener describe mylistener -n myspace

eventlistener list

List EventListeners.

Example: List all the EventListeners in a namespace
$ tkn eventlistener list -n myspace

triggerbinding

Manage TriggerBindings.

Example: Display TriggerBindings help
$ tkn triggerbinding -h

triggerbinding delete

Delete a TriggerBinding.

Example: Delete mybinding1 and mybinding2 TriggerBindings in a namespace
$ tkn triggerbinding delete mybinding1 mybinding2 -n myspace

triggerbinding describe

Describe a TriggerBinding.

Example: Describe the mybinding TriggerBinding in a namespace
$ tkn triggerbinding describe mybinding -n myspace

triggerbinding list

List TriggerBindings.

Example: List all the TriggerBindings in a namespace
$ tkn triggerbinding list -n myspace

triggertemplate

Manage TriggerTemplates.

Example: Display TriggerTemplate help
$ tkn triggertemplate -h

triggertemplate delete

Delete a TriggerTemplate.

Example: Delete mytemplate1 and mytemplate2 TriggerTemplates in a namespace
$ tkn triggertemplate delete mytemplate1 mytemplate2 -n `myspace`

triggertemplate describe

Describe a TriggerTemplate.

Example: Describe the mytemplate TriggerTemplate in a namespace
$ tkn triggertemplate describe mytemplate -n `myspace`

triggertemplate list

List TriggerTemplates.

Example: List all the TriggerTemplates in a namespace
$ tkn triggertemplate list -n myspace

clustertriggerbinding

Manage ClusterTriggerBindings.

Example: Display ClusterTriggerBindings help
$ tkn clustertriggerbinding -h

clustertriggerbinding delete

Delete a ClusterTriggerBinding.

Example: Delete myclusterbinding1 and myclusterbinding2 ClusterTriggerBindings
$ tkn clustertriggerbinding delete myclusterbinding1 myclusterbinding2

clustertriggerbinding describe

Describe a ClusterTriggerBinding.

Example: Describe the myclusterbinding ClusterTriggerBinding
$ tkn clustertriggerbinding describe myclusterbinding

clustertriggerbinding list

List ClusterTriggerBindings.

Example: List all ClusterTriggerBindings
$ tkn clustertriggerbinding list