Kubernetes ODR Task containers "waypoint-task-<ID>" clean-up

After a deployment using an ODR the container’s last state is “Succeeded”, and there ends up being hundreds of these lingering around. Each deployment task spins up a new container called waypoint-task-<ID>.

I’ve deployed Waypoint in Kubernetes using the Helm chart.

Is there an option to clean up these containers after the task is done?

If not I can always create a cron that runs kubectl delete pod --field-selector=status.phase==Succeeded -n waypoint

Hey philthynz,

Which version of kubernetes are you using? We leverage the job TTL feature in Kube 1.19+ so that Kubernetes automatically deletes old jobs and pods after they complete running. I think the default TTL is around 10 minutes between when they finish and when they’re deleted.



Hi @izaaklauer

It’s running v1.22.7+k3s1. I’ve upgraded to Waypoint 0.8.2 and it seems to be working fine now. I did see a lot of the containers stuck in terminating state, I’ve patched those with kubectl get pods -n waypoint -o jsonpath="{.items[*].metadata.name}" | xargs kubectl patch pod -n waypoint $1 -p '{"metadata":{"finalizers":null}}'.