此内容没有您所选择的语言版本。

Chapter 8. Moving the cluster logging resources with node selectors


You can use node selectors to deploy the Elasticsearch, Kibana, and Curator pods to different nodes.

Each component specification allows the component to target a specific node.

Prerequisites

  • Cluster logging and Elasticsearch must be installed. These features are not installed by default.

Procedure

  1. Add the desired label to your nodes:

    $ oc label <resource> <name> <key>=<value>
    Copy to Clipboard Toggle word wrap

    For example, to label a node:

    $ oc label nodes ip-10-0-142-25.ec2.internal type=elasticsearch
    Copy to Clipboard Toggle word wrap
  2. Edit the Cluster Logging Custom Resource in the openshift-logging project:

    $ oc edit ClusterLogging instance
    
    apiVersion: "logging.openshift.io/v1"
    kind: "ClusterLogging"
    metadata:
      name: "nodeselector"
    spec:
      managementState: "Managed"
      logStore:
        type: "elasticsearch"
        elasticsearch:
          nodeSelector:  
    1
    
            logging: es
          nodeCount: 1
          resources:
            limits:
              memory: 2Gi
            requests:
              cpu: 200m
              memory: 2Gi
          storage:
            size: "20G"
            storageClassName: "gp2"
          redundancyPolicy: "ZeroRedundancy"
      visualization:
        type: "kibana"
        kibana:
          nodeSelector:  
    2
    
            logging: kibana
          replicas: 1
      curation:
        type: "curator"
        curator:
          nodeSelector:  
    3
    
            logging: curator
          schedule: "*/10 * * * *"
      collection:
        logs:
          type: "fluentd"
          fluentd:
            nodeSelector:  
    4
    
            logging: fluentd
    Copy to Clipboard Toggle word wrap
1
Node selector for Elasticsearch.
2
Node selector for Kibana.
3
Node selector for Curator.
4
Node selector for Fluentd.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat