V
V
Vadim2020-09-11 14:39:49
Docker
Vadim, 2020-09-11 14:39:49

How to deal with memory leaks in pods on a Kubernetes cluster?

Hello,

it is required for each node in the cluster that 15% of the memory is always available for kubectl and other services. In addition, what is the best way to approach the pod configuration so that with a memory leak in the container, it still cannot eat all the memory? Or is it better to work at the Docker Containers level?

all the best,
Vadim

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
chupasaurus, 2020-09-11
@Viji

  1. In the kubelet config, set the required number of RAM for system and regular pods
  2. k8s sets memory.limit_in_bytes according to the limit when creating a cgroup pod
  3. In pods where leaks are possible, set resources.requests.memory equal to the limit

The first reserves resources for system and cluster services, the second will pull OOM when the limit is reached, the third removes the possibility of over provisioning.

M
Maxim, 2020-09-11
@Tomio

Hmmm, doesn't limiting memory resources help with this?

resources:
  limits:
    memory: "1024Mi"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question