openshift_logging_es_nodeselector 在基础设施节点上安装 EFK

openshift_logging_es_nodeselector 在基础设施节点上安装 EFK

我正在尝试在我的集群上安装 EFK,但遇到了问题。这是我的节点描述片段(okd 3.11)

metadata:
  name: okdmastertest.labtest.mycomapny.com
  selfLink: /api/v1/nodes/okdmastertest.labtest.mycomapny.com
  uid: 43905e07-7277-11e9-9beb-005056006301
  resourceVersion: '9193192'
  creationTimestamp: '2019-05-09T16:26:57Z'
  labels:
    beta.kubernetes.io/arch: amd64
    beta.kubernetes.io/os: linux
    kubernetes.io/hostname: okdmastertest.labtest.mycomapny.com
    node-role.kubernetes.io/infra: 'true'
    node-role.kubernetes.io/master: 'true'
  annotations:
    node.openshift.io/md5sum: a4305b3db4427b8d4bd21c1a11115c5d
    volumes.kubernetes.io/controller-managed-attach-detach: 'true'

在我的库存文件中,我有这些变量

all:
  children:
    etcd:
      hosts:
        okdmastertest.labtest.mycomapny.com:
    masters:
      hosts:
        okdmastertest.labtest.mycomapny.com:
    nodes:
      hosts:
        okdmastertest.labtest.mycomapny.com:
          openshift_node_group_name: node-config-master-infra
        okdnodetest1.labtest.mycomapny.com:
          openshift_node_group_name: node-config-compute
          openshift_schedulable: True
  OSEv3:
    children:
      etcd:
      masters:
      nodes:
    vars:
      {bla bla bla}
      openshift_logging_install_logging: true
      openshift_logging_es_nodeselector: 
        node-type: infra

但是当我运行日志记录剧本时不断收到的错误是

fatal: [okdmastertest.labtest.mycompany.com]: FAILED! => {
    "assertion": false,
    "changed": false,
    "evaluated_to": false,
    "msg": "No schedulable nodes found matching node selector for Elasticsearch - 'node-type=infra'"
}

什么是节点选择器的正确语法,以便将 elasticsearch 放在基础设施节点上?

答案1

将您的配置与例子从官方文献可以看出一些差异。

例如:

node-role.kubernetes.io/infra: 'true'

node-role.kubernetes.io/infra=true

请检查您的语法并将其与

如果不是这种情况,请与我分享这些命令的结果:

$ oc get nodes -o wide
$ oc describe node <node>

此外,如果您缺少,node-role.kubernetes.io/infra=true错误将如下所示:No schedulable nodes found matching node selector for Cluster Monitoring Operator - 'node-role.kubernetes.io/infra=true' 而不是这样:No schedulable nodes found matching node selector for Elasticsearch - 'node-type=infra'

再次执行$ oc get nodes -o wide以查看您的节点是否具有正确的类型。

如果有帮助的话请告诉我。

相关内容