You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Minikube部署K8s Addons版ELK遇Kibana未就绪及ES异常求助

Fixing "Kibana server is not ready yet" & Elasticsearch OOMKilled (Exit Code 137) in Minikube

Hey there, let’s work through this ELK deployment issue you’re hitting in Minikube. That exit code 137 on your elasticsearch-logging-0 pod is the key hint here—it almost always means the pod was killed by the kernel because it ran out of memory (OOMKilled). Minikube’s default resource limits are usually too tight for Elasticsearch, which is pretty memory-hungry. Here’s how to fix this step by step:

1. Boost Minikube’s Memory Allocation

Minikube typically starts with only 2GB of memory, which isn’t enough for Elasticsearch + Kibana + Fluentd. Let’s bump it up:

  • First, check your current Minikube memory setting:
    minikube config get memory
    
  • If it’s less than 4GB, stop and restart Minikube with more resources (4GB is the minimum, 6GB is even better):
    minikube stop && minikube delete && minikube start --memory=4096 --cpus=2
    

2. Add Resource Limits to Elasticsearch

The official fluentd-elasticsearch addon YAMLs often don’t set proper resource requests/limits for Elasticsearch, letting it hog too much memory. Edit your elasticsearch-logging.yaml file:

  • Find the spec.template.spec.containers section for the elasticsearch container, then add these resource constraints (adjust based on your Minikube memory):
    resources:
      requests:
        memory: "1Gi"
        cpu: "500m"
      limits:
        memory: "2Gi"
        cpu: "1"
    

This ensures Elasticsearch doesn’t eat up all available node memory, preventing OOM kills.

3. Redeploy the ELK Stack

Delete your existing deployment and reapply the modified YAMLs:

kubectl delete -f fluentd-elasticsearch/
kubectl create -f fluentd-elasticsearch/

4. Verify Elasticsearch Health

Wait a minute or two for the pods to restart, then check their status:

kubectl get pods -n kube-system | grep elasticsearch

Once the pod shows Running without restarts, grab the Elasticsearch service’s cluster IP:

kubectl get svc -n kube-system elasticsearch-logging

SSH into Minikube and test connectivity again:

curl <your-es-cluster-ip>:9200

You should get a JSON response with Elasticsearch’s cluster details if it’s working.

5. Check Kibana Again

Once Elasticsearch is healthy, Kibana will automatically connect to it. Give it 2-3 minutes to finish initializing, then refresh minikube-ip:30345—the "Kibana server is not ready yet" message should be gone.

Extra Troubleshooting Tips

  • If you still see issues, check the Elasticsearch pod logs for more clues:
    kubectl logs elasticsearch-logging-0 -n kube-system
    
  • Verify your Minikube node has enough free resources:
    kubectl describe nodes minikube
    

Look at the Allocatable and Used sections under Capacity to confirm memory isn’t maxed out.

内容的提问来源于stack exchange,提问作者Rosmee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 05:08:08