Difference between revisions of "Resource Management for Pods and Containers"

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
* <code>[[request]]</code>
+
* <code>[[request.memory]]</code>
* <code>[[limit]]</code>
+
* <code>[[limits.memory]]</code>
  
 
  {{spec.containers}}
 
  {{spec.containers}}
  
  
XXXX
 
  
spec.containers[].resources.limits.cpu
+
{{kind pod resources}}
spec.containers[].resources.limits.memory
+
 
spec.containers[].resources.limits.hugepages-<size>
+
 
spec.containers[].resources.requests.cpu
+
  Note:
  spec.containers[].resources.requests.memory
+
  If you specify a limit for a resource, but do not specify any request, and no admission-time mechanism has applied a default request for that resource, then Kubernetes copies the limit you specified and uses it as the requested value for the resource.
  spec.containers[].resources.requests.hugepages-<size>
 
  
 
== See also ==
 
== See also ==
  
 
* {{Kubernetes scheduler}}
 
* {{Kubernetes scheduler}}

Latest revision as of 07:28, 30 May 2024


spec.containers: image


---
apiVersion: v1
kind: Pod
metadata:
  name: frontend
spec:
  containers:
  - name: app
    image: images.my-company.example/app:v4
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
  - name: log-aggregator
    image: images.my-company.example/log-aggregator:v6
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"


Note:
If you specify a limit for a resource, but do not specify any request, and no admission-time mechanism has applied a default request for that resource, then Kubernetes copies the limit you specified and uses it as the requested value for the resource.

See also[edit]

Advertising: