[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Resource limits on pods/containers inside project



Okay, the resource limits on a project doesn't affect the dc of a running pod? After recreating my pod it seems to work.
(it's not like compute resources where the DC is changing).


From: lorenz vanthillo outlook com
To: users lists openshift redhat com
Subject: Resource limits on pods/containers inside project
Date: Fri, 8 Apr 2016 11:25:04 +0200

oc v1.1.3
kubernetes v1.2.0-origin

As far as I understand, compute resources are for one container, but when you want a max consumption of all your pods/containers inside a project you can create limits.

I've created limits:
{
  "apiVersion": "v1",
  "kind": "LimitRange",
  "metadata": {
    "name": "limits"
  },
  "spec": {
    "limits": [{
       "type": "Pod",
       "max": {
          "cpu": "2",
          "memory": "200m"
        }
      },
      {
        "type": "Container",
        "max": {
           "cpu": "2",
           "memory": "200m"
        }
    }]
  }
}

I've created it inside my project: oc create -f limits.yaml
Name:        limits
Namespace:    myprojectname
Type        Resource    Min    Max    Default Request    Default Limit    Max Limit/Request Ratio
----        --------    ---    ---    ---------------    -------------    -----------------------
Pod        cpu        -    2    -        -        -
Pod        memory        -    200m    -        -        -
Container    cpu        -    2    2        2        -
Container    memory        -    200m    200m        200m        -

But when I'm taking a look to my metrics they are just the same as before (shown in the webconsole with hawkular).
What am I doing wrong or is my interpretation wrong?

I'm also a bit confused: memory is 500 MiB for a pod in the webconsole. When I want it to use 200 MiB, how do I have to define it in my limits.yaml?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]