Skip to content

Instantly share code, notes, and snippets.

@chmouel
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chmouel/9f5d3ef95c0198453231 to your computer and use it in GitHub Desktop.
Save chmouel/9f5d3ef95c0198453231 to your computer and use it in GitHub Desktop.
OpenShift v3 cleanup resources
#!/bin/bash
for i in replicationController pod services route imagerepository buildconfig deploymentconfig service;do
for j in $(osc get $i|awk '{print $1}'|egrep -v '(POD|NAME|CONTROLLER)');do
osc delete $i $j
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment