How to Install and Run Tekton Pipelines on Kubernetes: A Step‑by‑Step Guide
This article walks you through installing Tekton pipelines on a Kubernetes cluster, including installing specific versions, verifying CRDs, creating and executing simple Tasks and TaskRuns, using the Tekton CLI, and setting up the Tekton Dashboard, with commands and code snippets for each step.
Hello, I’m Qiao Ke. Starting today I will share a series of articles on Tekton, summarizing my learning and hoping to help anyone interested in Tekton.
Installation
Tekton can be installed easily with the official release files. To install the latest version:
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yamlIf your environment cannot access the public registry, download the images elsewhere and push them to a private registry.
To install a specific version, e.g., v0.32.1:
kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.32.1/release.yamlMake sure your Kubernetes version is compatible; for example, with Kubernetes 1.19.16 I installed Tekton 0.29.1.
Run Tests
After installation, you can list the Tekton CRDs that were added:
# kubectl get crd | grep tekton
clustertasks.tekton.dev 2022-02-28T06:15:38Z
conditions.tekton.dev 2022-02-28T06:15:38Z
extensions.dashboard.tekton.dev 2022-02-28T06:18:40Z
pipelineresources.tekton.dev 2022-02-28T06:15:38Z
pipelineruns.tekton.dev 2022-02-28T06:15:38Z
pipelines.tekton.dev 2022-02-28T06:15:38Z
runs.tekton.dev 2022-02-28T06:15:38Z
taskruns.tekton.dev 2022-02-28T06:15:38Z
tasks.tekton.dev 2022-02-28T06:15:38ZAnd the Tekton pods that are running:
# kubectl get po -n tekton-pipelines
NAME READY STATUS RESTARTS AGE
tekton-pipelines-controller-75c456df85-qxvq2 1/1 Running 0 6m57s
tekton-pipelines-webhook-5bc8d6b7c4-w6pdn 1/1 Running 0 8mCreate a simple Task that prints "Hello World!":
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: hello
spec:
steps:
- name: hello
image: ubuntu
command:
- echo
args:
- "Hello World!"Apply the Task: # kubectl apply -f test-task.yaml Verify the Task exists:
# kubectl get task
NAME AGE
hello 20hRun the Task with a TaskRun:
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: hello
spec:
taskRef:
name: hello # kubectl apply -f taskrun.yamlCheck the TaskRun status:
# kubectl get taskruns.tekton.dev
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME
hello True Succeeded 41s 26sInspect the pod created by the TaskRun and view its logs:
# kubectl get po
NAME READY STATUS RESTARTS AGE
hello-pod-s86lh 0/2 Completed 1 98s
# kubectl logs hello-pod-s86lh
Hello World!The pod status is Completed, similar to a finished Kubernetes Job.
Install Tekton CLI
Download and install the Tekton command‑line tool:
wget https://github.com/tektoncd/cli/releases/download/v0.22.0/tkn_0.22.0_Linux_x86_64.tar.gz
tar xf tkn_0.22.0_Linux_x86_64.tar.gz
mv tkn /usr/local/bin/After installation, view the help output:
# tkn --help
CLI for tekton pipelines
Usage:
tkn [flags]
tkn [command]
Available Commands:
bundle Manage Tekton Bundles
clustertask Manage ClusterTasks
clustertriggerbinding Manage ClusterTriggerBindings
condition Manage Conditions
eventlistener Manage EventListeners
hub Interact with tekton hub
pipeline Manage pipelines
pipelinerun Manage PipelineRuns
resource Manage pipeline resources
task Manage Tasks
taskrun Manage TaskRuns
triggerbinding Manage TriggerBindings
triggertemplate Manage TriggerTemplates
Other Commands:
completion Prints shell completion scripts
version Prints version information
Flags:
-h, --help help for tkn
Use "tkn [command] --help" for more information about a command.List all Tasks:
# tkn task list
NAME DESCRIPTION AGE
build-and-push 20 hours ago
hello 21 hours ago
test 21 hours agoInstall Tekton Dashboard
Deploy the Tekton Dashboard for a user‑friendly UI:
kubectl apply --filename https://github.com/tektoncd/dashboard/releases/latest/download/tekton-dashboard-release.yamlAfter installation, the dashboard UI looks like this:
This article covered the basic installation steps for Tekton, its CLI, and the Dashboard. The official documentation provides more details, and future articles will explore Tekton pipelines, advanced usage, and migration from Jenkins.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
