Interview Prep/CI/CD/Jenkins Credentials, Plugins and Controller Issues

Jenkins agent pods leak: hundreds of completed `Error` pods remain in the namespace.

IntermediateTroubleshootingJenkins Credentials, Plugins and Controller Issues
Answer

Likely causes → Pods crash before cleanup; the controller restarted while pods were running.

Diagnose → kubectl get pods -n jenkins --field-selector=status.phase=Failed.

Fix → Set pod retention to Never/OnFailure sensibly; delete stale pods with a CronJob; set activeDeadlineSeconds on the template.

Prevent → Resource quotas on the build namespace.

All CI/CD questions

More on Jenkins Credentials, Plugins and Controller Issues