Overview
Tekton is a Kubernetes-native CI/CD framework. Tasks define individual steps, Pipelines compose Tasks, Triggers respond to events, and Workspaces share data between steps.
Capabilities
- Kubernetes-native CI/CD primitives
- Reusable Tasks and Pipelines from Tekton Hub
- Event-based triggers with webhooks
- Workspaces for data sharing between steps
- Custom Task types for specialized workloads
- Dashboard for pipeline visualization
When to Use
Trigger phrases:
"tekton pipelines"
"Running CI/CD on Kubernetes clusters"
"Need cloud-native, vendor-neutral pipeline definitions"
"Want reusable, composable CI/CD building blocks"
Running CI/CD on Kubernetes clusters
Need cloud-native, vendor-neutral pipeline definitions
Want reusable, composable CI/CD building blocks
Building platform engineering CI/CD foundations
When NOT to Use
- Task is outside your authorization scope
- You need to implement controls (use implementing-* skills)
- Task is about analysis, not action (use analyzing-* skills)
- You don't have access to target systems
- Task requires compliance expertise (consult professionals)
- Task is about defense, not offense (use defensive skills)
Pseudo Code
The tekton-pipelines workflow follows a standard pipeline pattern.
Core flow:
# tekton-pipelines primary flow
input = prepare(raw_data)
result = process(input, config={kubernetes, native, pipelines, tasks, tekton})
validate(result)
deliver(result)
Error handling:
on error:
log(error_details)
retry_with_backoff(max=3)
if still_failing: alert_and_escalate()
Task Definition
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: build-and-push
spec:
params:
- name: image
type: string
workspaces:
- name: source
steps:
- name: build
image: gcr.io/kaniko-project/executor:latest
args:
- --dockerfile=$(workspaces.source.path)/Dockerfile
- --context=$(workspaces.source.path)
- --destination=$(params.image)
Pipeline Definition
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: build-test-deploy
spec:
params:
- name: image
type: string
workspaces:
- name: shared-workspace
tasks:
- name: clone
taskRef:
name: git-clone
workspaces:
- name: output
workspace: shared-workspace
- name: build
taskRef:
name: build-and-push
runAfter: [clone]
params:
- name: image
value: $(params.image)
workspaces:
- name: source
workspace: shared-workspace
- name: test
taskRef:
name: run-tests
runAfter: [build]
workspaces:
- name: source
workspace: shared-workspace
Trigger (Webhook)
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
name: build-on-push
spec:
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: build-$(uid)
spec:
pipelineRef:
name: build-test-deploy
params:
- name: image
value: registry.example.com/app:$(tt.params.git-sha)
Common Patterns
- Task Hub:
tkn hub search git-clone — find community Tasks
- Workspaces: PVC for persistent data, ConfigMap for config, emptyDir for temp
- Results: Tasks can output results consumed by downstream Tasks
- When expressions:
when: [{ input: "$(params.run-tests)", operator: in, values: ["true"] }]
- Sidecars: Run services alongside Tasks (e.g., Docker-in-Docker)
How to Use
- Define infrastructure as code (Terraform, CloudFormation, Pulumi)
- Review changes through PR process before applying
- Configure monitoring and alerting for critical paths
- Set up secrets management (Vault, AWS Secrets Manager, etc.)
- Document runbooks for deployment, rollback, and incident response
- Test disaster recovery procedures regularly
Red Flags
- Infrastructure changes without review: Unreviewed changes cause outages — use PRs for infra code
- No rollback strategy: Every deployment needs a tested rollback plan before it runs
- Secrets in configuration files: Secrets in YAML/JSON get committed to version control
- Missing monitoring and alerting: Without monitoring, outages go undetected until users report them
- No documentation for runbooks: Without runbooks, on-call engineers waste time re-discovering procedures
Verification
Process
- Analyze the task requirements
- Apply domain expertise
- Verify output quality
Anti-Rationalization Table
| Rationalization |
Reality |
| "Manual deployments are fine" |
Manual deployments are error-prone and不可 repeatable. Automate. |
| "We do not need monitoring" |
Without monitoring, you are flying blind. Add observability from day one. |
| "Infrastructure as code is overkill" |
IaC enables reproducibility, version control, and disaster recovery. |
1---2name: tekton-pipelines3description: Use when tekton CI/CD pipelines — Tasks, Pipelines, Triggers, Workspaces for Kubernetes-native CI. Use when working with tekton pipelines.4license: Apache-2.05---6789## Overview1011Tekton is a Kubernetes-native CI/CD framework. Tasks define individual steps, Pipelines compose Tasks, Triggers respond to events, and Workspaces share data between steps.1213## Capabilities1415- Kubernetes-native CI/CD primitives16- Reusable Tasks and Pipelines from Tekton Hub17- Event-based triggers with webhooks18- Workspaces for data sharing between steps19- Custom Task types for specialized workloads20- Dashboard for pipeline visualization2122## When to Use2324**Trigger phrases:**25- "tekton pipelines"26- "Running CI/CD on Kubernetes clusters"27- "Need cloud-native, vendor-neutral pipeline definitions"28- "Want reusable, composable CI/CD building blocks"293031- Running CI/CD on Kubernetes clusters32- Need cloud-native, vendor-neutral pipeline definitions33- Want reusable, composable CI/CD building blocks34- Building platform engineering CI/CD foundations3536## When NOT to Use3738- Task is outside your authorization scope39- You need to implement controls (use implementing-* skills)40- Task is about analysis, not action (use analyzing-* skills)41- You don't have access to target systems42- Task requires compliance expertise (consult professionals)43- Task is about defense, not offense (use defensive skills)444546## Pseudo Code4748The tekton-pipelines workflow follows a standard pipeline pattern.4950Core flow:51```52# tekton-pipelines primary flow53input = prepare(raw_data)54result = process(input, config={kubernetes, native, pipelines, tasks, tekton})55validate(result)56deliver(result)57```5859Error handling:60```61on error:62 log(error_details)63 retry_with_backoff(max=3)64 if still_failing: alert_and_escalate()65```666768### Task Definition69```yaml70apiVersion: tekton.dev/v1beta171kind: Task72metadata:73 name: build-and-push74spec:75 params:76 - name: image77 type: string78 workspaces:79 - name: source80 steps:81 - name: build82 image: gcr.io/kaniko-project/executor:latest83 args:84 - --dockerfile=$(workspaces.source.path)/Dockerfile85 - --context=$(workspaces.source.path)86 - --destination=$(params.image)87```8889### Pipeline Definition90```yaml91apiVersion: tekton.dev/v1beta192kind: Pipeline93metadata:94 name: build-test-deploy95spec:96 params:97 - name: image98 type: string99 workspaces:100 - name: shared-workspace101 tasks:102 - name: clone103 taskRef:104 name: git-clone105 workspaces:106 - name: output107 workspace: shared-workspace108 - name: build109 taskRef:110 name: build-and-push111 runAfter: [clone]112 params:113 - name: image114 value: $(params.image)115 workspaces:116 - name: source117 workspace: shared-workspace118 - name: test119 taskRef:120 name: run-tests121 runAfter: [build]122 workspaces:123 - name: source124 workspace: shared-workspace125```126127### Trigger (Webhook)128```yaml129apiVersion: triggers.tekton.dev/v1beta1130kind: TriggerTemplate131metadata:132 name: build-on-push133spec:134 resourcetemplates:135 - apiVersion: tekton.dev/v1beta1136 kind: PipelineRun137 metadata:138 name: build-$(uid)139 spec:140 pipelineRef:141 name: build-test-deploy142 params:143 - name: image144 value: registry.example.com/app:$(tt.params.git-sha)145```146147## Common Patterns148149- **Task Hub**: `tkn hub search git-clone` — find community Tasks150- **Workspaces**: PVC for persistent data, ConfigMap for config, emptyDir for temp151- **Results**: Tasks can output results consumed by downstream Tasks152- **When expressions**: `when: [{ input: "$(params.run-tests)", operator: in, values: ["true"] }]`153- **Sidecars**: Run services alongside Tasks (e.g., Docker-in-Docker)154155## How to Use1561571. Define infrastructure as code (Terraform, CloudFormation, Pulumi)1582. Review changes through PR process before applying1593. Configure monitoring and alerting for critical paths1604. Set up secrets management (Vault, AWS Secrets Manager, etc.)1615. Document runbooks for deployment, rollback, and incident response1626. Test disaster recovery procedures regularly163164## Red Flags165166- **Infrastructure changes without review**: Unreviewed changes cause outages — use PRs for infra code167- **No rollback strategy**: Every deployment needs a tested rollback plan before it runs168- **Secrets in configuration files**: Secrets in YAML/JSON get committed to version control169- **Missing monitoring and alerting**: Without monitoring, outages go undetected until users report them170- **No documentation for runbooks**: Without runbooks, on-call engineers waste time re-discovering procedures171172## Verification173174- [ ] Skill output matches expected behavior175176## Process1771781. Analyze the task requirements1792. Apply domain expertise1803. Verify output quality181182## Anti-Rationalization Table183184| Rationalization | Reality |185|---|---|186| "Manual deployments are fine" | Manual deployments are error-prone and不可 repeatable. Automate. |187| "We do not need monitoring" | Without monitoring, you are flying blind. Add observability from day one. |188| "Infrastructure as code is overkill" | IaC enables reproducibility, version control, and disaster recovery. |