Quick Start
This document helps new users quickly understand and use Tekton Pipelines to create a simple CI/CD workflow.
TOC
IntroductionUse CasesEstimated Reading TimePrerequisitesProcess OverviewStep-by-Step InstructionsStep 1: Create a "Hello World" TaskStep 2: Create a "Goodbye" Task with ParametersStep 3: Create a PipelineStep 4: Run the PipelineStep 5: Clean UpAdvanced ConfigurationIntroduction
Tekton is an open-source cloud native CI/CD (Continuous Integration and Continuous Delivery/Deployment) solution. It provides Kubernetes-native building blocks for creating containerized, standardized, and portable CI/CD pipelines.
Use Cases
- Create automated build, test, and deployment workflows
- Run CI/CD pipelines in a Kubernetes-native way
- Build container images without privileged access
- Implement standardized deployment processes across multiple cloud providers
- Create reusable components for your CI/CD systems
Estimated Reading Time
15-20 minutes
Prerequisites
- A Kubernetes cluster (you can use minikube for local testing)
- Tekton Pipelines installed on your cluster
- kubectl installed and configured to access your cluster
- Tekton CLI (tkn) installed for easier interaction with Tekton resources
Process Overview
Step-by-Step Instructions
Step 1: Create a "Hello World" Task
A Task is the basic building block of a Tekton Pipeline. It consists of a series of steps that run sequentially in a container.
-
Create a file named
hello-task.yamlwith the following content:TIPPlease replace the
ubuntuimage with an actual accessible image, same below. -
Apply the Task to your cluster:
-
A
TaskRunobject instantiates and executes this Task. Create another file namedhello-world-run.yamlwith the following content: -
Apply the
TaskRunto your cluster: -
Monitor the TaskRun execution:
You should see output similar to:
-
Take a look at the logs:
You should see output similar to:
Step 2: Create a "Goodbye" Task with Parameters
Now let's create a second Task that accepts parameters to make it more flexible.
-
Create a file named
goodbye-task.yamlwith the following content: -
Apply the Task to your cluster:
Step 3: Create a Pipeline
A Pipeline defines an ordered series of Tasks arranged in a specific execution order as part of your CI/CD workflow.
-
Create a file named
hello-goodbye-pipeline.yamlwith the following content:This Pipeline:
- Defines a parameter called
username - Includes two Tasks:
helloandgoodbye - Specifies that
goodbyeshould run afterhellocompletes - Passes the Pipeline parameter to the
goodbyeTask
- Defines a parameter called
-
Apply the Pipeline to your cluster:
Step 4: Run the Pipeline
A PipelineRun is used to execute a Pipeline and provide any required parameters.
-
Create a file named
hello-goodbye-pipeline-run.yamlwith the following content: -
Apply the PipelineRun to your cluster to start the Pipeline:
-
Monitor the Pipeline execution:
You should see output similar to:
Step 5: Clean Up
To remove the resources created in this tutorial:
Advanced Configuration
Once you're comfortable with basic Tasks and Pipelines, you can leverage advanced features to enhance your workflows:
-
How to Configure Dynamic Forms: Configure dynamic forms for UI-based Pipeline and Task operations, enabling dropdown menus, validation rules, and dynamic data loading without writing frontend code.
-
Output Markdown to the Overview Tab (PipelineRuns & TaskRuns): You can configure your TaskRuns and PipelineRuns to display formatted markdown content in the Overview tab, making it easier to visualize results, summaries, or reports directly in the UI.
-
For more information on Pipeline configuration and usage, please refer to How to.
Tekton™ is a trademark of The Linux Foundation.
Red Hat® and OpenShift® are registered trademarks of Red Hat, Inc. in the United States and other countries.
Alauda is an independent vendor. This product is not affiliated with, endorsed by, or sponsored by The Linux Foundation or Red Hat, Inc. All trademarks are the property of their respective owners and are used here for identification purposes only.