CLI
Overview
Tekton provides a CLI, tkn, for easier interaction with Tekton components.
It is available as a binary executable on major platforms; you may also build
it from the source, or set it up as a kubectl plugin.
Installation
tkn is available on macOS via brew:
brew install tektoncd-cliFor Mac OS X with Homebrew
ln -s $(brew --prefix)/opt/tektoncd-cli/bin/tkn /usr/local/bin/kubectl-tknYou can also download it as a tarball from the tkn Releases page.
After downloading the file, extract it to your PATH:
# Replace YOUR-DOWNLOADED-FILE with the file path of your own.
sudo tar xvzf YOUR-DOWNLOADED-FILE -C /usr/local/bin/ tknBuild from source
If you would like to build tkn from the source, set up your Go development
environment, clone the GitHub repository for tkn,
and run the following commands in the cloned directory:
export GO111MODULE=on
make bin/tknThe tkn executable will be available at /bin.
Add as a kubectl plugin
To add tkn as a kubectl plugin, run the following commands:
# The following commands assumes that your `tkn` executable is available
# at /usr/local/bin/tkn. You may need to use a different value on your
# system.
ln -s /usr/local/bin/tkn /usr/local/bin/kubectl-tkn For Mac OS X with Homebrew
ln -s $(brew --prefix)/opt/tektoncd-cli/bin/tkn /usr/local/bin/kubectl-tknIf configured correctly, you should see tkn listed in the output.
kubectl plugin listUsage
Run tkn help to see the list of available commands.