在Azure容器实例中运行Elasticsearch

时间:2019-11-29 10:01:56

标签: elasticsearch azure-container-instances

我正在尝试在Azure容器实例中运行ElasticSearch。我已经使用Azure CLI创建了这样的容器:

az container create --image elasticsearch:7.4.2 --name $containerGroupName -g $resourceGroup --ip-address public --dns-name-label <mydns> --memory 8 --cpu 2 --ports 9200

容器最终处于等待状态。当我在Azure门户中签出日志时,会看到以下错误:

错误:[2]引导程序检查失败 [1]:最大虚拟内存区域vm.max_map_count [65530]太低,增加到至少[262144]

显然,这与虚拟内存有关:https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

但是如何在容器内更改它?由于容器未运行,我无法连接到它。

1 个答案:

答案 0 :(得分:0)

我意识到ACI不是运行ElasticSearch的最佳选择。在等待其他地方的ElasticSearch稳定环境时,我只是临时需要它以进行概念验证。

最终,我通过选择一个较旧的ElasticSearch图像使其运行:

az container create --image elasticsearch:5.6.14-alpine --name $containerGroupName -g $resourceGroup --ip-address public --dns-name-label <mydns> --memory 4 --cpu 2 --ports 9200

相关问题