JHipster Elasticsearch无法在Kubernetes上启动

时间:2018-07-03 13:59:26

标签: elasticsearch kubernetes jhipster

尝试在Kubernetes上部署JHipster控制台时,jhipster-elasticsearch-client容器无法启动。广告连播失败,原因为OOMKilled,退出代码为137

将默认内存限制从512M增加到1G不能解决问题。

该节点还具有足够的内存:

Non-terminated Pods:         (9 in total)
  Namespace                  Name                                              CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ---------                  ----                                              ------------  ----------  ---------------  -------------
  default                    gateway-mysql-5c66b69cb6-r84xb                    0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-console-84c54fbd79-k8hjt                 0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-elasticsearch-client-7cb576d5d7-s48mn    200m (10%)    400m (20%)  512Mi (6%)       1Gi (13%)
  default                    jhipster-import-dashboards-s9k2g                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-registry-0                               0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-zipkin-6df799f5d8-7fhz9                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                calico-node-hc5p9                                 250m (12%)    0 (0%)      0 (0%)           0 (0%)
  kube-system                kube-proxy-cgmqj                                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                tiller-deploy-5c688d5f9b-zxnnp                    0 (0%)        0 (0%)      0 (0%)           0 (0%)
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ------------  ----------  ---------------  -------------
  450m (22%)    400m (20%)  512Mi (6%)       1Gi (13%)

1 个答案:

答案 0 :(得分:4)

Elasticsearch的默认安装配置有1 GB的堆。您可以通过向容器添加ENV变量来配置Docker Elasticsearch内存需求:

- "ES_JAVA_OPTS=-Xms512m -Xmx512m"

相关文档: