按照文档说明操作, 安装完并没有生成elasticsearch-logging-data和elasticsearch-logging-discovery

kubectl get po -n kubesphere-logging-system
NAME READY STATUS RESTARTS AGE
elasticsearch-logging-curator-elasticsearch-curator-272319kg6xg 0/1 Completed 0 2d6h
elasticsearch-logging-curator-elasticsearch-curator-272333t4sp2 0/1 Completed 0 30h
elasticsearch-logging-curator-elasticsearch-curator-272347ptq59 0/1 Completed 0 6h9m
fluent-bit-cckc8 1/1 Running 0 14d
fluent-bit-kpr4d 1/1 Running 0 14d
fluent-bit-qb9cp 1/1 Running 0 14d
fluentbit-operator-5576bbdcff-l7jk5 1/1 Running 0 14d
ks-events-exporter-74b5c8d8b7-bgqs5 2/2 Running 0 56m
ks-events-operator-76b99948b6-v44fj 1/1 Running 0 56m
ks-events-ruler-5d75bddbff-8pcm7 2/2 Running 0 56m
ks-events-ruler-5d75bddbff-pvqnb 2/2 Running 0 56m
kube-auditing-operator-7967969d69-5lnl2 1/1 Running 0 56m
kube-auditing-webhook-deploy-58f6d76b8b-hgsxj 1/1 Running 0 56m
kube-auditing-webhook-deploy-58f6d76b8b-tlf6j 1/1 Running 0 56m
logsidecar-injector-deploy-5b484f575d-ctdgv 2/2 Running 0 14d
logsidecar-injector-deploy-5b484f575d-ldnpz 2/2 Running 0 14d

检查了一下ks-install的日志, 发现这一条信息:
TASK [common : KubeSphere | Deploying elasticsearch-logging] *******************
skipping: [localhost]

elizabethvik

默认情况下,如果启用了日志系统,KubeKey 将安装内置 Elasticsearch。对于生产环境,如果您想启用日志系统,强烈建议在 config-sample.yaml 中设置以下值,尤其是 externalElasticsearchUrl 和 externalElasticsearchPort。在安装前提供以下信息后,KubeKey 将直接对接您的外部 Elasticsearch,不再安装内置 Elasticsearch。

你对接的是集群外部的ES,有些组件就不会安装在集群内,是预期行为。

    kevendeng 配置了以后, 日志查询还是点不开,弹窗报一个
    ReadMapCB: expect { or n, but found <, error found in #1 byte of …|<html> <he|…, bigger context …|<html> <head><title>400 The plain HTTP request was|…
    的错.
    在fluent-bit容器日志里有下面这一条错误.
    [2021/10/14 08:01:29] [ warn] net_tcp_fd_connect: getaddrinfo(host=‘https://foo.es.amazonaws.com’): Name or service not known

    我用的es服务是使用HTTPS的,VPC服务,已经配置当前k8s集群可以访问.
    使用kubectl -n kubesphere-system edit cm kubesphere-config -oyaml
    输入的日志相关的配置如下.

    logging:
    host: http://foo.es.amazonaws.com:443
    basicAuth: True
    username: “foo”
    password: “foobar”
    indexPrefix: ks-logstash-log


    请问我该怎么配置连接?

      elizabethvik
      很明显,这是DNS查询失败了

      foo.es...这个域名应该并没有正式DNS记录吧,那fluent-bit自然不知道这个域名指向何处

      你需要做的是,要么在每个需要访问该ES服务的节点的/etc/hosts文件中增加该域名到IP的映射,并重启相关Pod
      或是在coredns等dns组件中增加该hosts映射,让该域名能够得到解析。

        6 天 后

        kevendeng 好的,感谢,我发现这个是我的coredns的问题.
        目前遇到最后一个问题,就是我的opensearch服务是https协议的, 请问在哪里可以配置协议?
        目前fluent-bit打印的日志是:

        [2021/10/20 06:30:54] [error] [output:es:es.0] HTTP status=400 URI=/_bulk, response:

        <html>

        <head><title>400 The plain HTTP request was sent to HTTPS port</title></head>

        <body>

        <center><h1>400 Bad Request</h1></center>

        <center>The plain HTTP request was sent to HTTPS port</center>

        </body>

        </html>

        [2021/10/20 06:30:54] [ warn] [engine] chunk ‘25-1634711443.476033309.flb’ cannot be retried: task_id=4, input=tail.0 > output=es.0

        我估计这是直接用TCP协议去请求443port导致的问题, 请问我改怎么解决这个问题呢?
        再次感谢!

        没事了,现在已经可以正常输入日志到es了…https的问题我这边解决了.
        但是现在的问题又回到了log search tool没法正常打开的问题上.

          1 个月 后

          elizabethvik 你好,我的问题跟你一样,也是用的外置aws,https的问题你是怎么解决的?