Resource Requirements - Sandeep-K-Khandelwal/CKAD GitHub Wiki

We can specify the amount of memory and CPU for the containers in the POD. We can specify the requested amount of memory and CPU as well as the limit for these resources.

Resources are defined for each container.

apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  labels:
    app: myapp
    type: front-end
spec:
  containers:
    - name: nginx-container
      image: nginx
      resources:
        requests:
         cpu: 1
         memory: "1Gi"
        limits:
         cpu: 2
         memory: "1.5Gi"