我一直在尝试使用 newly-promoted-to-stable helm chart 使 Elasticsearch 在 K8s 上运行,顺便说一句,对于 elasticsearch v 6.4.2,效果很好。然而,我们绑定(bind)到一个需要 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 chart 出现的错误。
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
显然,它期待更高版本的 elasticsearch。
最佳答案
这里的简短回答是 ElasticSearch 5.5.3 应该与 Kubernetes 一起工作。请注意 5.5.3 的配置略有不同,我相信它们在 5.6 之后发生了变化,例如制作 x-pack默认启用,是的,使用 StatefulSet或者从现有的稳定 Helm chart 开始。
关于elasticsearch - Elasticsearch 5.5.3 版本可以在带有 StatefulSet 的 Kubernetes 上运行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52933990/