Module 1: Tekton fundamentals
Coolstuff Store’s engineering team is under pressure. Deployments are manual, slow, and inconsistent, and your manager has given you 2 hours to demonstrate that Red Hat OpenShift Pipelines can solve this problem.
Before building pipelines, you need to understand the core building blocks. In this module, you’ll explore Tekton, the open source framework that powers Red Hat OpenShift Pipelines, and learn how its components fit together. By the end, you’ll have run your first Tekton Task and be ready to build complete pipelines in the modules that follow.
Learning objectives
By the end of this module, you’ll be able to:
-
Describe how Tekton components, including Tasks, Pipelines, and PipelineRuns, relate to each other
-
Navigate the Red Hat OpenShift Pipelines interface in the OpenShift web console
-
Create a Tekton Task using a YAML definition and the
ocCLI -
Execute a Task using a TaskRun and verify the results using logs
Exercise 1: Log in and explore your environment
Coolstuff Store’s OpenShift cluster has Red Hat OpenShift Pipelines 1.21 pre-installed. Your first task is to confirm the installation and get familiar with the Pipelines interface before you start building.
-
Open the OpenShift console in your browser. Click the link below to open the OpenShift console in a new tab:
-
If needed, log in with your credentials:
-
Username:
%OPENSHIFT_USERNAME% -
Password:
%OPENSHIFT_PASSWORD%
-
-
This is the overview of details on the current OpenShift project you are in. It shows details on your workloads in it. At the moment it is empty but this we will change during the course of this workshop.
-
In the left navigation menu, click Pipelines and then Pipelines again. This menu confirms that OpenShift Pipelines is active in your cluster. The list is empty for now and No Pipelines found is shown in the main view. You’ll populate it in the next exercises.
-
Navigate to Ecosystem and then Installed Operators.
-
Search for OpenShift Pipelines in the filter box. Confirm the operator shows a phase of Succeeded.
Exercise 2: Create your first Task
Now that OpenShift Pipelines is confirmed, you’ll create your first Tekton Task. This Task prints a custom message to demonstrate the structure of a Task definition. Building simple Tasks first gives you a foundation before you write more complex ones in Module 2.
Verify you are still logged in on OpenShift
oc whoami
Expected output
%OPENSHIFT_USERNAME%
| If not logged in, go back to the previous page and run the oc login command again. |
Start creating Tasks
-
Create the Task definition file:
cat > hello-task.yaml << 'EOF' apiVersion: tekton.dev/v1 kind: Task metadata: name: hello-coolstuff spec: params: - name: message type: string default: "Hello from Coolstuff Store!" description: The message to print steps: - name: print-message image: registry.access.redhat.com/ubi9/ubi-minimal:latest script: | #!/usr/bin/env bash echo "$(params.message)" echo "Red Hat OpenShift Pipelines is running!" date EOF -
Apply the Task to your cluster:
oc apply -f hello-task.yamlExpected output:
task.tekton.dev/hello-coolstuff created
-
Verify the Task was created:
oc get tasksExpected output:
NAME AGE hello-coolstuff 10s
Verify
Inspect the Task definition to confirm it was stored correctly:
oc describe task hello-coolstuff
-
Task name is
hello-coolstuff -
1 step named
print-message -
1 param named
messagewith a default value
Verify in the OpenShift console that you can see the same Task.
Click on Pipelines in the left hand menu, then click Tasks and a list of tasks will be shown in the center view. At the moment we only have one task as shown below.
Exercise 3: Run your Task with a TaskRun
Defining a Task tells Tekton what to do. To actually execute it, you create a TaskRun. In this exercise, you’ll trigger the hello-coolstuff Task, inspect the execution status, and view the output logs.
-
Create a TaskRun definition that references your Task:
cat > hello-taskrun.yaml << 'EOF' apiVersion: tekton.dev/v1 kind: TaskRun metadata: name: hello-coolstuff-run-01 spec: taskRef: name: hello-coolstuff params: - name: message value: "Coolstuff Store CI/CD is ready!" EOF -
Apply the TaskRun to trigger execution:
oc apply -f hello-taskrun.yamlExpected output:
taskrun.tekton.dev/hello-coolstuff-run-01 created
-
Watch the TaskRun status in real time:
oc get taskrun hello-coolstuff-run-01 -wExpected output (wait a few seconds until status updates):
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME hello-coolstuff-run-01 True Succeeded 30s 5s
Press
Ctrl+Cto stop watching once the status showsSucceeded. -
View the execution logs using the Tekton CLI:
tkn taskrun logs hello-coolstuff-run-01Expected output:
[print-message] Coolstuff Store CI/CD is ready! [print-message] Red Hat OpenShift Pipelines is running! [print-message] Thu Feb 26 00:00:00 UTC 2026
-
View the TaskRun in the OpenShift console.
-
Navigate to Pipelines, then Tasks and in the central view click TaskRuns. In the central view you can now see the status(Succeeded) and more details of your TaskRun.
-
Click
hello-coolstuff-run-01if you want to look at even more details.
-
Verify
Confirm the TaskRun completed with a Succeeded status:
oc get taskrun hello-coolstuff-run-01 \
-o jsonpath='{.status.conditions[0].reason}'
Expected output:
Succeeded
-
Status reason is
Succeeded -
Logs contain your custom message
Coolstuff Store CI/CD is ready! -
COMPLETIONTIMEis populated in the TaskRun
Module summary
You’ve completed the Tekton fundamentals module. Coolstuff Store now has a verified Red Hat OpenShift Pipelines installation, and you’ve run your first Task.
What you accomplished:
-
Confirmed Red Hat OpenShift Pipelines 1.21 is installed and operational
-
Created a Tekton Task with a parameter and a custom step
-
Executed the Task using a TaskRun and reviewed the output logs
-
Navigated the Pipelines interface in both the CLI and the OpenShift console
Key takeaways:
-
Tasks define what to do. TaskRuns execute them. This separation makes Tasks reusable.
-
All Tekton resources are standard Kubernetes objects, so you manage them with
ocortkn. -
The OpenShift console provides a visual view of pipeline runs alongside the CLI.
-
Pipelines chain Tasks into a complete workflow. You’ll build one in Module 3.
Next steps:
Module 2: Creating Tasks and TaskRuns builds on this foundation by creating Tasks with Workspaces and Parameters that pass data between steps.
Learning outcomes
By completing this module, you should now understand:
-
How Tekton Tasks encapsulate reusable CI/CD steps and execute as Kubernetes pods
-
The relationship between a Task and a TaskRun: the Task defines what to do, the TaskRun executes it
-
How to create and manage Tekton resources using the
ocandtknCLIs and the OpenShift console -
Why cloud native CI/CD built on Kubernetes primitives provides better portability and consistency than manual deployment processes




