examples/v1/taskruns/README.md
This directory contains example TaskRun configurations demonstrating various Tekton Pipelines features. These examples illustrate how to run individual Tasks and showcase functionality such as parameters, workspaces, sidecars, secrets, StepActions, environment configuration, and execution behavior.
These files serve as reference implementations to help users understand how different TaskRun configurations work in practice.
Before running these examples, ensure the following components are installed and configured:
You need access to a running Kubernetes cluster. This can be a local cluster (such as Kind or Minikube) or a managed cluster from a cloud provider.
Tekton Pipelines must be installed in the cluster, as these examples rely on Tekton custom resources such as Task, TaskRun, and related pipeline components.
Installation instructions:
https://tekton.dev/docs/pipelines/install/
The Kubernetes CLI (kubectl) must be installed and configured to communicate with your cluster.
Documentation:
https://kubernetes.io/docs/tasks/tools/
The Tekton CLI (tkn) is useful for inspecting TaskRuns and streaming logs.
Installation instructions:
https://tekton.dev/docs/cli/
Some examples may require specific Tekton feature flags to be enabled depending on the functionality being demonstrated.
Most examples in this directory define a TaskRun resource that can be created directly in your Kubernetes cluster.
If the file defines a fixed metadata.name, you can run it with:
kubectl apply -f <file>.yaml
Some examples instead use metadata.generateName. This allows the resource to be created multiple times with unique names.
For those files you should use:
kubectl create -f <file>.yaml
Using kubectl apply on resources that use generateName will fail because apply requires a fixed resource name.
After creating a TaskRun, you can inspect it with:
kubectl get taskruns
kubectl describe taskrun <name>
You can also stream logs for a TaskRun using the Tekton CLI:
tkn taskrun logs <name> -f
Simple TaskRun examples demonstrating basic execution behavior.
Examples demonstrating how parameters and results are used within Tasks and TaskRuns.
Examples showing how environment variables and configuration are provided to tasks.
Examples demonstrating volume mounting and filesystem configuration.
Examples showing how Tekton workspaces are used to share data between steps and sidecars.
Examples demonstrating the use of sidecar containers alongside task steps.
Examples demonstrating the use of StepActions.
Examples demonstrating step templates and execution configuration.
Examples demonstrating security-related configurations.
Examples demonstrating error handling and failure behavior.
Examples primarily used for testing or regression validation.