Last active
July 10, 2024 18:23
-
-
Save waynedovey/cbf23d0a9c798c8de68b5f2043ba945b to your computer and use it in GitHub Desktop.
Scale Down OpenShift Monitoring
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 patch clusterversion/version --type='merge' -p "$(cat <<- EOF | |
spec: | |
overrides: | |
- group: apps/v1 | |
kind: Deployment | |
name: cluster-monitoring-operator | |
namespace: openshift-monitoring | |
unmanaged: true | |
EOF | |
)" | |
oc patch prometheus/k8s -n openshift-monitoring --type='merge' -p "$(cat <<- EOF | |
spec: | |
replicas: 0 | |
EOF | |
)" | |
oc patch alertmanagers/main -n openshift-monitoring --type='merge' -p "$(cat <<- EOF | |
spec: | |
replicas: 0 | |
EOF | |
)" | |
oc scale --replicas=0 deploy/cluster-monitoring-operator -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/prometheus-adapter -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/thanos-querier -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/grafana -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/kube-state-metrics -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/openshift-state-metrics -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/prometheus-adapter -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/telemeter-client -n openshift-monitoring | |
oc scale --replicas=0 deployment.apps/prometheus-operator -n openshift-monitoring | |
oc scale --replicas=0 statefulset.apps/alertmanager-main -n openshift-monitoring | |
oc delete DaemonSet node-exporter -n openshift-monitoring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment