Tekton "couldn't retrieve Pipeline X: not found" in CI
The controller resolved the pipelineRef by name in the PipelineRun's namespace and found no Pipeline. The run fails before any TaskRun is created.
What this error means
A PipelineRun is marked Failed with reason CouldntGetPipeline and "couldn't retrieve Pipeline 'release': pipelines.tekton.dev 'release' not found".
couldn't retrieve Pipeline "release": pipelines.tekton.dev "release" not foundCommon causes
The Pipeline is not in the run namespace
Pipelines are namespaced. The PipelineRun was created in a namespace where the referenced Pipeline was never applied.
A stale or misspelled pipelineRef name
The pipelineRef.name does not match any applied Pipeline metadata.name in that namespace.
How to fix it
Apply the Pipeline before creating the run
- Run
kubectl get pipeline -n <ns>to see what is present. - Apply the Pipeline manifest into the target namespace.
- Re-create the PipelineRun so the ref now resolves.
kubectl apply -f pipeline.yaml -n ci
kubectl get pipeline -n ciInline the pipelineSpec to avoid the lookup
Embedding the spec in the PipelineRun removes the by-name resolution entirely.
spec:
pipelineSpec:
tasks:
- name: build
taskRef:
name: buildHow to prevent it
- Apply Pipeline and PipelineRun into the same namespace.
- Use a git or bundle resolver so refs are not tied to cluster state.
- Store all Tekton definitions in git and apply them as one setup step.