Skip to content

Instantly share code, notes, and snippets.

@rawlingsj
Created April 30, 2015 08:26
Show Gist options
  • Save rawlingsj/6194875d7d26be82ada2 to your computer and use it in GitHub Desktop.
Save rawlingsj/6194875d7d26be82ada2 to your computer and use it in GitHub Desktop.
nuke_openshift.sh
osc get replicationControllers | awk '{print $1}' | grep -v CONTROLLER | xargs -n 1 openshift kube resize --replicas=0 rc
osc get services | awk '{print $1}' | grep -v NAME | xargs -n 1 osc delete service
osc get pods | awk '{print $1}' | grep -v POD | xargs -n 1 osc delete pod
osc get replicationControllers | awk '{print $1}' | grep -v CONTROLLER | xargs -n 1 osc delete replicationController
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment