Skip to content

Instantly share code, notes, and snippets.

@mrsiano
Created November 1, 2017 10:34
Show Gist options
  • Save mrsiano/c7035b0152001ef2405607f41464d44d to your computer and use it in GitHub Desktop.
Save mrsiano/c7035b0152001ef2405607f41464d44d to your computer and use it in GitHub Desktop.
a way to re deploy prometheus for kube-system without destroy your cluster
oc project kube-system
oc get all --all-namespaces|egrep 'prom|alert'|awk '{print $2}'|grep [a-z]|xargs oc delete
oc get configmaps|grep prom|awk '{print $1}' | xargs oc delete configmaps
oc get secrets|egrep 'prom|alert'|awk '{print $1}' | xargs oc delete secrets
oc delete sa prometheus
oc delete clusterrolebindings prometheus-cluster-reader
oc new-app -f prometheus.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment