how can i found that the pod was recreate by out of limits memory

5/15/2018

If a pod run out of limits memory, which define as follows:

   resources:
          limits:
            memory: 80Gi 
            cpu: 10

The kubernetes will recreate the pod but how can I found that the pod was recreate by out of limits memory?

Any logs record this situation?

-- loma
kubernetes

1 Answer

5/15/2018

The simplest way is to use Heapster for monitoring cluster resource usage. Using a Grafana setup with InfluxDB as storage backends for Heapster gives you the CPU and Memory usage of the entire cluster, individual pods and containers.

When a Pod gets restarted due to reaching memory limit, you should see a sawtooth wave on memory graph for this pod.

More useful information about monitoring tools and how to set it up can be found here.

-- VAS
Source: StackOverflow