Created
November 1, 2017 10:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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