Closed nobody4t closed 3 years ago
We might need more information about what you're trying to do to help solve this.
Can you run kustomize build your-configs/
to see the output YAML, and then kubectl apply
it? That could help narrow the issue down to kustomize
or kubectl
.
One possible explanation for this error is that your YAML declares a Task
, then immediately afterwards a Pipeline
that references that Task, and when the Pipeline is validated, the Task isn't quite yet available, and pipeline validation fails with that error message, pipeline can not retrieve tasks
.
There are a couple other scenarios where CouldntGetTask
is returned, which could also be the culprit.
Also, could you share what version of Tekton you're using, and more about the underlying K8s cluster (version, cloud provider, etc.)?
yes, I can apply the built YAML from kustomization. And it worked well. Only the tasks can not be found. If I apply the yaml one by one, it will be good too. But this is a little cumbersome that is why I use kustomize.
In the kustomization yaml file, I do order the files as tasks, pipeline, and pipelinerun.
The versions are as below:
Client version: 0.16.0
Pipeline version: v0.21.0
Triggers version: v0.12.0
It could be a race between task and pipeline indeed - there's no easy solution as long as we stick to synchronous validation. You could split your tasks and pipelines and always apply your tasks first.
Some users wrap their pipelines in helm
which might give you slightly more orchestration compared to kustomize
alone.
Alternatively you could kustomize build
your tasks, and publish them to OCI bundles - and refer to the bundle from your pipelines. OCI bundles are an alpha feature though, and they might imply a more substantial change to your workflow.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen
with a justification.
/lifecycle stale
Send feedback to tektoncd/plumbing.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen
with a justification.
/lifecycle rotten
Send feedback to tektoncd/plumbing.
I have multiple yamls, including tasks, pipeline and pipelinerun.
I try to deploy them with kustomize. But there is always a problem: CouldntGetTask which says : pipeline can not retrive the tasks.
Is this a bug?
I expected to run all yaml files with the kustomization. It will be so convenient.