Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 58 additions & 7 deletions modules/infrastructure-moving-monitoring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,61 @@
[id="infrastructure-moving-monitoring-{context}"]
= Moving the monitoring solution

[IMPORTANT]
====
The monitoring solution uses Cluster Version Operator (CVO) to create the
ConfigMap that the monitoring Operator uses to determine how to deploy its
resources. Because it uses the CVO and users cannot modify the CVO, you cannot
change where the Operator deploys resources.
====

By default, the Prometheus Cluster Monitoring stack, which contains Prometheus,
Grafana, and AlertManager, is deployed to
provide cluster monitoring. It is managed by the Cluster Monitoring Operator.
To move its components to different machines, you create and apply a custom
ConfigMap.

.Procedure

. Save the following ConfigMap definition as the
`cluster-monitoring-configmap.yaml` file:
+
[source,yaml]
----
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-monitoring-config
namespace: openshift-monitoring
data:
config.yaml: |+
alertmanagerMain:
nodeSelector:
node-role.kubernetes.io/infra: ""
prometheusK8s:
nodeSelector:
node-role.kubernetes.io/infra: ""
prometheusOperator:
nodeSelector:
node-role.kubernetes.io/infra: ""
grafana:
nodeSelector:
node-role.kubernetes.io/infra: ""
k8sPrometheusAdapter:
nodeSelector:
node-role.kubernetes.io/infra: ""
kubeStateMetrics:
nodeSelector:
node-role.kubernetes.io/infra: ""
telemeterClient:
nodeSelector:
node-role.kubernetes.io/infra: ""
----
+
Running this ConfigMap forces the components of the monitoring stack to redeploy
to infrastructure nodes.

. Apply the new ConfigMap:
+
----
$ oc create -f cluster-monitoring-configmap.yaml
----

. Watch the monitoring Pods move to the new machines:
+
----
$ watch 'oc get pod -n openshift-monitoring -o wide'
----