【问题标题】:Can Elasticsearch version 5.5.3 run on Kubernetes with StatefulSet?Elasticsearch 5.5.3 版可以在带有 StatefulSet 的 Kubernetes 上运行吗?
【发布时间】:2018-10-31 21:55:03
【问题描述】:

我一直在尝试使用newly-promoted-to-stable helm chart 让 Elasticsearch 在 K8s 上运行,顺便说一句,对于 elasticsearch v 6.4.2,它运行良好。但是,我们绑定到一个需要 elasticsearch v 5.5.3 的 grails 应用程序,我们无法对其进行升级。我已将图表中的 elasticsearch 映像版本降级为 5.5.3(也尝试了 v 5.6.12),但无法启动。

我查看了elasticsearch operator,但它目前已设置为与 AWS S3 存储类型一起使用,开箱即用,并且 GCP 需要做一些工作(尽管没有快照功能)。在深入研究之前,我想知道它是否可以与 5.5.3 一起使用。

有谁知道我是否可以让 elasticsearch v 5.5.3 在 k8s 集群中运行?我会说至少使用 k8s StatefulSet。

谢谢!

更新

我想我应该在将 elasticsearch 图像降级到 5.5.3 时给出现有 helm 图表存在的错误。

master-0 pod 启动失败:

Error injecting constructor, ElasticsearchException[java.io.IOException: failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: IOException[failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: ElasticsearchException[Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin]; at org.elasticsearch.gateway.GatewayMetaState.<init>(Unknown Source) while locating org.elasticsearch.gateway.GatewayMetaState for parameter 4 at org.elasticsearch.gateway.GatewayService.<init>(Unknown Source) while locating org.elasticsearch.gateway.GatewayService Caused by: ElasticsearchException[java.io.IOException: failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: IOException[failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: ElasticsearchException[Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin];

客户端 pod 失败:

[2018-10-22T17:52:51,835][WARN ][o.e.d.z.UnicastZenPing ] [elasticsearch-client-6bf954c595-7zlpc] failed to resolve host [elasticsearch-discovery] java.net.UnknownHostException: elasticsearch-discovery

显然,它期待更高版本的弹性搜索。

【问题讨论】:

  • 将掌舵图移植到版本 5.5.3
  • 我不确定你是什么意思@ljaz-Khan?该版本的弹性搜索没有掌舵图。而且,正如我所说,当我将 elasticsearch 映像版本更改为 5.5.3 时,如果无法启动 - {elasticsearch-discovery} 无法启动并且 {Unknown license version found, please upgrade all nodes to the latest elasticsearch-license插入}。我想知道是否有人知道舵图的其他更改可能会起作用。远射,我知道。谢谢。
  • 仅供参考,我正在查看 helm chart 的历史,看看它是否支持 v5.5.3。看起来从 v5.4 移到 v6.6.1 here

标签: elasticsearch kubernetes kubernetes-helm


【解决方案1】:

这里的简短回答是 ElasticSearch 5.5.3 应该与 Kubernetes 一起使用。请注意,5.5.3 的配置略有不同,我相信它们在 5.6 之后发生了变化,例如默认启用了 x-pack,是的,使用 StatefulSet 或从现有的稳定 Helm 图表开始。

【讨论】:

  • 谢谢@rico,但我想我正在寻找(希望稍微)更长的答案 - 就像如何。
  • 由于没有官方图表并且操作员是 AWS 的,因此需要时间和工作 :-)
【解决方案2】:

我们最终选择了this Medium post 的变体,以使 ES 5.5.3 在“多节点”模式下工作。这不是最新 ES 图表版本提供的 HA,但会让我们继续前进。

我们使用了常规存储类,而不是 SSD,我们必须暂时禁用 ES 启动检查,因为我们无法让 ulimit 命令在 ES init 上工作。

我们有多个 ES 节点,在我们可以升级应用程序以使用 ES 最新版本之前都很好。

【讨论】:

    猜你喜欢
    • 2021-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多