Overview
Debugging features in Tekton:- Breakpoints on Step failure
- Breakpoints before Step execution
- Interactive debugging in Step containers
- Access to debug scripts and information
- Exit code inspection
Debug features are an alpha capability. Set
enable-api-fields to "alpha" in the feature-flags ConfigMap to enable debugging.Enabling Debug Mode
Enable debug features in your Tekton installation:enable-api-fields: "alpha":
Breakpoint on Failure
Pause Task execution when a Step fails, allowing you to inspect the container state:How Failure Breakpoints Work
- Step executes and fails (non-zero exit code)
- Instead of stopping, the Step container pauses
- Subsequent Steps are not skipped
- Step waits for user intervention
- User can inspect the container and decide how to continue
Accessing the Paused Step
When a Step is paused on failure:Interacting with the Paused Step
1
Exec into the container
2
Inspect the environment
3
Fix and continue or mark as failed
Option 1: Mark as successful and continueOption 2: Mark as failed and continue
Debug Scripts on Failure
Example:
Breakpoint Before Step
Pause execution before a Step starts:Accessing Before-Step Breakpoint
When the breakpoint is hit:Before-Step Debug Options
1
Exec into the container
2
Inspect or prepare the environment
3
Continue or skip the step
Option 1: Continue with step executionOption 2: Skip step and mark as failed
Before-Step Debug Scripts
Debug Environment
Tekton provides additional resources in debug mode:Debug Mounts
Debug Scripts Reference
OnFailure Breakpoint:/tekton/debug/scripts/debug-continue- Exit with success (creates/tekton/run/<step>/out.breakpointexit)/tekton/debug/scripts/debug-fail-continue- Exit with failure (creates/tekton/run/<step>/out.breakpointexit.err)
/tekton/debug/scripts/debug-beforestep-continue- Proceed with Step execution/tekton/debug/scripts/debug-beforestep-fail-continue- Skip Step and mark as failed
Step Information
Each Step has debug information available:Viewing Logs and Status
Get TaskRun Status
View Step Logs
Using Tekton CLI
Troubleshooting Common Issues
Image Pull Errors
Failed to pull image
Failed to pull image
Symptoms:Solutions:
- Verify image exists:
- Check image pull secrets:
- Verify ServiceAccount:
- Check credentials:
Workspace Issues
Workspace not found or permission denied
Workspace not found or permission denied
Symptoms:Debug steps:Common fixes:
- Verify workspace is provided:
- Check PVC exists:
- Fix permissions with initContainer or fsGroup:
Result Errors
Result not found or invalid
Result not found or invalid
Symptoms:Debug:Fixes:
- Ensure result is written:
- Use
-nflag with echo (no trailing newline):
- Verify result size (must be < 4KB):
Authentication Issues
Git or Docker authentication failed
Git or Docker authentication failed
Check credentials are mounted:Verify Secret annotation:Should have annotation like:Check ServiceAccount:See the Authentication guide for detailed configuration.