Exploring Jenkins X Garbage Collection

This lesson will discuss CronJobs in Jenkins X which will execute periodically to remove unused resources used in the preview environment.

It would be silly for each preview environment to run forever. We need to figure out how to remove everything deployed as part of the pull request process for those that are already merged or closed. We could manually delete previews, but that would result in too much human involvement in something repetitive and predictable. We could create a script that would do that for us that would be executed periodically, but before we do that we should check whether Jenkins X already has some Kubernetes CronJobs.

Getting Kubernetes CronJobs

Get hands-on with 1400+ tech skills courses.