kube-cleanup-operator

Kubernetes Operator to automatically delete completed Jobs and their Pods

Experimental Kubernetes Operator to automatically delete completed Jobs and their Pods. Controller listens for changes in Pods created by Jobs and deletes it on Completion.

Some defaults:

  • All Namespaces are monitored by default
  • Only Pods created by Jobs are monitored

Usage

screensharing

# remember to change namespace in RBAC manifests for monitoring namespaces other than "default"
kubectl create -f https://raw.githubusercontent.com/lwolf/kube-cleanup-operator/master/deploy/rbac.yaml

# create deployment
kubectl create -f https://raw.githubusercontent.com/lwolf/kube-cleanup-operator/master/deploy/deployment.yaml

kubectl logs -f $(kubectl get pods --namespace default -l "run=cleanup-operator" -o jsonpath="{.items[0].metadata.name}")

# Use simple job to test it
kubectl create -f https://k8s.io/examples/controllers/job.yaml

Docker images

docker pull quay.io/lwolf/kube-cleanup-operator

Tell us about a new Kubernetes application

Newsletter

Never miss a thing! Sign up for our newsletter to stay updated.

About

Discover and share new Kubernetes applications

Navigation