A Tekton task is a reusable Kubernetes resource that defines container-based steps for one unit of pipeline work. Tekton’s pipeline engine executes these Task resources after installing its Kubernetes custom resource definitions. section 3.5.1
A task definition commonly specifies:
- A relationship to pipelines, which can sequence reusable tasks alongside inline or catalog-provided definitions. section 3.5.2
Minimal greeting task
apiVersion: tekton.dev/v1 kind: Task metadata: name: hello-world-task spec: params: - name: name type: string default: tekton user steps: - name: echo image: ubuntu command: [echo] args: ["Hello World: $(params.name)"] Create a TaskRun that references hello-world-task and supplies a name value. Inspect completion with kubectl get taskrun and output with kubectl logs on the associated pod.
