Tekton "secret X not found" in CI
A ServiceAccount, workspace, or step env references a Secret by name that Tekton cannot find in the run namespace. Depending on where it is referenced, the run fails to start or the pod stays Pending.
What this error means
A run or pod fails with "secret \"git-creds\" not found" or "secrets \"git-creds\" not found" in events.
secrets "git-creds" not foundCommon causes
The Secret is not in the run namespace
Secrets are namespaced. A Secret applied to another namespace does not resolve for this run.
A name typo in a ServiceAccount or env ref
The ServiceAccount secrets entry or a secretKeyRef names a Secret that does not exist.
How to fix it
Create the Secret in the run namespace
- Confirm the namespace the run uses.
- Apply or create the Secret there.
- Re-run once the Secret exists.
kubectl create secret generic git-creds \
--from-literal=token=$GIT_TOKEN -n ciCorrect the referenced name
Ensure the ServiceAccount and step refs name a Secret that exists in the namespace.
kubectl get secret -n ciHow to prevent it
- Apply Secrets into the same namespace as the runs that use them.
- Keep ServiceAccount and env secret names matched to real objects.
- Provision CI secrets as part of namespace setup.