About Tekton CLI
With the Tekton (tkn) Pipelines command-line interface (CLI) you can interact with Tekton from a terminal. This section describes how to install it and lists the basic commands.
Installing the CLI
In order to interact with Tekton from a terminal, you need to install the Tekton CLI (tkn).
Tarball Installation
For macOS X
-
Download the compressed file:
$ curl -LO https://github.com/tektoncd/cli/releases/download/v0.8.0/tkn_0.8.0_Darwin_x86_64.tar.gz
-
Extract the compressed file:
$ sudo tar xvzf tkn_0.8.0_Darwin_x86_64.tar.gz -C /usr/local/bin tkn
-
Place it in a directory that is on your
PATH
For Linux AMD64
-
Download the compressed file:
$ curl -LO https://github.com/tektoncd/cli/releases/download/v0.8.0/tkn_0.8.0_Linux_x86_64.tar.gz
-
Extract the compressed file:
$ sudo tar xvzf tkn_0.8.0_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn
-
Place it in a directory that is on your
PATH
For Linux ARM64
-
Download the compressed file:
$ curl -LO https://github.com/tektoncd/cli/releases/download/v0.8.0/tkn_0.8.0_Linux_arm64.tar.gz
-
Extract the compressed file:
$ sudo tar xvzf tkn_0.8.0_Linux_arm64.tar.gz -C /usr/local/bin/ tkn
-
Place it in a directory that is on your
PATH
For Windows
-
Download the zip file:
C:\Users\Admin\Downloads> curl -Uri https://github.com/tektoncd/cli/releases/download/v0.8.0/tkn_0.8.0_Windows_x86_64.zip -OutFile tkn_0.8.0_Windows_x86_64.zip
-
Extract the compressed file
tkn.exeto yourPATH:Expand-Archive -Path <sourcepath>/tkn_0.8.0_Windows_x86_64.zip -DestinationPath <destinationpath>
Pipeline tkn reference
This section lists basic tkn CLI commands. For a more detailed description, see Tekton Pipelines CLI.
Utility commands
Pipelines management commands
tkn pipeline create
Create a pipeline in a namespace.
mypipeline.yaml file in a namespace$ tkn pipeline create -f mypipeline.yaml -n myspace
tkn pipeline delete
Delete a pipeline in a namespace.
mypipeline pipeline from a namespace$ tkn pipeline delete mypipeline -n myspace
tkn pipeline describe
Describe a pipeline in a namespace.
mypipeline pipeline$ tkn pipeline describe mypipeline
tkn pipeline list
List pipelines in a namespace.
$ tkn pipeline list
Pipelinerun commands
tkn pipelinerun cancel
Cancel a pipelinerun in a namespace.
mypipelinerun pipelinerun from a namespace$ tkn pipeline cancel mypipelinerun -n myspace
tkn pipelinerun delete
Delete pipelinerun in a namespace.
$ tkn pipelinerun delete mypipelinerun1 mypipelinerun2 -n myspace
tkn pipelinerun describe
Describe a pipelinerun in a namespace.
mypipelinerun pipelinerun in a namespacetkn pipelinerun describe mypipelinerun -n myspace
Task management commands
tkn task create
Create a task in a namespace.
mytask.yaml file in a namespace$ tkn task create -f mytask.yaml -n myspace
tkn task delete
Delete task resources in a namespace.
mytask1 and mytask2 tasks from a namespace$ tkn task delete mytask1 mytask2 -n myspace
tkn task describe
Describe a task in a namespace.
mytask task in a namespace$ tkn task describe mytask -n myspace
tkn task list
List tasks in a namespace.
$ tkn task list -n myspace
Taskrun commands
tkn taskrun cancel
Cancel a taskrun in a namespace.
mytaskrun taskrun from a namespace$ tkn taskrun cancel mytaskrun -n myspace
tkn taskrun delete
Delete taskruns in a namespace.
mytaskrun1 and mytaskrun2 taskruns from a namespace$ tkn taskrun delete mytaskrun1 mytaskrun2 -n myspace
tkn taskrun describe
Describe a taskrun in a namespace.
mytaskrun taskrun in a namespace$ tkn taskrun describe mytaskrun -n myspace
Condition management commands
Pipeline resource management commands
tkn resource create
Create a pipeline resource in a namespace.
myresource.yaml file in a namespace$ tkn resource create -f myresource.yaml -n myspace
tkn resource delete
Delete a pipeline resource in a namespace.
myresource pipeline resource from a namespace$ tkn resource delete myresource -n myspace
Clustertask management commands
tkn clustertask delete
Delete a clustertask resource in a cluster.
mytask1 and mytask2 clustertasks$ tkn clustertask delete mytask1 mytask2
tkn clustertask describe
Describe a clustertask.
mytask clustertask$ tkn clustertask describe mytask1
Trigger management commands
tkn eventlistener delete
Delete event listeners in a namespace.
mylistener1 and mylistener2 event listeners in a namespace$ tkn eventlistener delete mylistener1 mylistener2 -n myspace
tkn eventlistener list
Lists event listeners in a namespace.
$ tkn eventlistener list -n myspace
tkn triggerbinding
Manage trigger bindings.
$ tkn triggerbinding -h
tkn triggerbinding delete
Delete trigger bindings in a namespace.
mybinding1 and mybinding2 trigger bindings in a namespace$ tkn triggerbinding delete mybinding1 mybinding2 -n myspace
tkn triggerbinding list
List trigger bindings in a namespace.
$ tkn triggerbinding list -n myspace
tkn triggertemplate
Manage trigger templates.
$ tkn triggertemplate -h