7.3. 将 Gluster 块存储启用为指标的后端
按照下方所述的任务,将 Gluster 块存储作为指标的后端
注意
默认情况下,由于容器原生虚拟化执行三向复制,因此可以从集群中的任何位置访问重启的节点。因此,建议关闭 Cassandra 级别复制以避免容量开销
- 要在 Openshift Container Platform 中启用指标,请参阅 https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics
openshift_metrics_cassandra_storage_typeansible 变量应设置为动态:[OSEv3:vars]openshift_metrics_cassandra_storage_type=dynamic例如,以下列出了 openshift_metrics_ 的变量集。
openshift_metrics_install_metrics=true openshift_metrics_storage_kind=dynamic openshift_metrics_hawkular_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_metrics_cassandra_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_metrics_heapster_nodeselector={"node-role.kubernetes.io/infra": "true"} openshift_metrics_storage_volume_size=10Gi openshift_metrics_cassandra_pvc_storage_class_name="glusterfs-registry-block"- 运行 Ansible playbook。如需更多信息,请参阅 https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics。
要验证,请执行以下命令:
# oc get pods --namespace openshift-infra它应该列出以下 pod 正在运行:
heapster-cassandra heapster-metrics hawkular-&*9
注意