liveBook · Manning

Tekton task

As explained in Platform Engineering on Kubernetes

A Tekton task is a reusable definition of container-based steps executed to perform a unit of work in a Tekton pipeline.

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.

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains manifests, parameters, container commands, TaskRuns, pod inspection, and logs, but stops short of detailed controller internals.
Examples
Uses an Ubuntu echo task, parameter substitution, TaskRun output, and a pipeline combining wget, cat, and greeting tasks.
What it assumes
Assumes a Kubernetes cluster and Tekton installation, while teaching task manifests and executions through a simple example.
What you can do after
Builds a parameterized task, runs it with a TaskRun, and diagnoses execution through kubectl, pods, and logs.
How it connects
Connects tasks to Kubernetes resources, TaskRuns, Tekton pipelines, PipelineRuns, workspaces, and the Tekton catalog.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.