Kubernetes resource limitation for containers not working

9/28/2016

I have a Kubernetes setup deployed on 4 Ubuntu virtual machines with one master and 3 minions. I created a pod with one container with following resource limitation options.

     limits:
   cpu: 750m
   memory: 750Mi
 requests:
   cpu: 500m
   memory: 500Mi

Here as far as I have understood, this particular pod will not use more than 750 MB on the host machine. Container which resides in the pod is a memory intensive java process. After some time when I get the 'top' output of the host machine, I could see that java process is taking more memory (around 1GB in resident space) than allowed threshold. Is this the expected behaviour? If so what is the idea of adding resource limits.

enter image description here

-- Dimuthu
kubernetes

0 Answers