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".
Tekton
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.
Terminal
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.
pipelinerun.yaml
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.
Related guides
Tekton "couldn't retrieve Task X: not found" in CIFix Tekton "couldn't retrieve Task X: tasks.tekton.dev not found" in CI - the TaskRun or Pipeline references…
Tekton "Pipeline X can't be Run; it has an invalid spec" in CIFix Tekton "Pipeline X can't be Run; it has an invalid spec" in CI - the Pipeline definition fails validation…
Tekton git/bundle resolver "failed to resolve" in CIFix Tekton git or bundle resolver "failed to get ... failed to resolve" in CI - the resolver could not fetch…