in Education by
How do we control the resource usage of POD?

1 Answer

0 votes
by

With the use of limit and request resource usage of a POD can be controlled.

Request: The number of resources being requested for a container. If a container exceeds its request for resources, it can be throttled back down to its request.

Limit: An upper cap on the resources a single container can use. If it tries to exceed this predefined limit it can be terminated if K8's decides that another container needs these resources. If you are sensitive towards pod restarts, it makes sense to have the sum of all container resource limits equal to or less than the total resource capacity for your cluster.

Example:

apiVersion: v1
kind: Pod
metadata:
 name: demo
spec:
 containers:
 - name: example1
 image:example/example1
 resources:
   requests:
     memory: "_Mi"
     cpu: "_m"
   limits:
     memory: "_Mi"
     cpu: "_m"

Related questions

0 votes
    How to do maintenance activity on the K8 node?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    Which of these is not a Service Spec? (1)ClusterIP (2)PodIP (3)ExternalName (4)NodePort...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    Kubernetes Architectutre consists of ______ (1)Master and Slave (2)Server and Client (3)Master and Node (4)All of the these...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    Kubernetes cluster must contain only one Master? (1)False (2)True...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    What are the various things that can be done to increase Kubernetes security?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    What is the role of Load Balance in Kubernetes?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    How does the Resource Agent monitor the cloud usage?...
asked Aug 8, 2021 in Technology by JackTerrance
0 votes
    What is the usage of control file in Oracle?...
asked Dec 18, 2020 in Technology by JackTerrance
0 votes
    I'm trying to fetch some data from the REST API of HP Alm. It works pretty well with a small ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response provides indication to server to revalidate resource if max-age has passed?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is not cachable?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server, no intermediary can cache the resource?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is cachable by any component?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Why do we need concurrency control on B+ trees ? (a) To remove the unwanted data (b) To easily ... in Index Structures topic in division Concurrency Control of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    I want to migrate my webapp from Amazon EC2 to ECS. I ECS I have to allocate memory and vCPU for the ... needed for the process? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
...