Tekton is a powerful and flexible open-source framework for creating CI/CD (Continuous Integration and Continuous Deployment) systems. It allows developers to define and run pipelines, which are sequences of tasks that automate the process of building, testing, and deploying applications. Tekton is designed to be cloud-native, leveraging Kubernetes to provide scalability and reliability.
When working with Tekton, you might encounter a situation where a PipelineRun
is stuck in a pending state. This means that the pipeline execution has not started yet, and it is waiting for certain conditions or resources to be available.
In this scenario, you will notice that the PipelineRun
status remains pending for an extended period. This can be observed by running the following command:
kubectl get pipelinerun -n <namespace>
The output will show the status as Pending
.
The pending state of a PipelineRun
typically indicates that it is waiting for a resource or condition to be satisfied. This could be due to missing input resources, unfulfilled conditions, or insufficient cluster resources.
To resolve the pending PipelineRun
, follow these steps:
Ensure that all resources required by the pipeline are available and correctly defined. Check the PipelineRun
YAML for resource specifications and verify their existence:
kubectl get resources -n <namespace>
Make sure that the resources are correctly referenced in the pipeline.
If your pipeline uses conditions, ensure that they are met. You can check the conditions by inspecting the PipelineRun
status:
kubectl describe pipelinerun <pipelinerun-name> -n <namespace>
Look for any unmet conditions and address them accordingly.
Ensure that your Kubernetes cluster has sufficient resources to execute the pipeline. Check the available CPU and memory:
kubectl top nodes
If resources are insufficient, consider scaling your cluster or optimizing resource requests and limits in your pipeline tasks.
For more detailed information on Tekton and troubleshooting, consider visiting the following resources:
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo