0
0
Kubernetesdevops~10 mins

Resource requests and limits in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a CPU request for a container in a pod spec.

Kubernetes
resources:
  requests:
    cpu: [1]
Drag options to blanks, or click blank then click option'
A2Gi
B500m
C1
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory units like '2Gi' for CPU request
Using plain numbers without units
2fill in blank
medium

Complete the code to set a memory limit for a container in a pod spec.

Kubernetes
resources:
  limits:
    memory: [1]
Drag options to blanks, or click blank then click option'
A1
B100m
C500m
D256Mi
Attempts:
3 left
💡 Hint
Common Mistakes
Using CPU units like '100m' for memory
Using plain numbers without units
3fill in blank
hard

Fix the error in the resource requests section by completing the blank.

Kubernetes
resources:
  requests:
    memory: [1]
Drag options to blanks, or click blank then click option'
A512Mi
B1000m
C1000
D512
Attempts:
3 left
💡 Hint
Common Mistakes
Using millicores units for memory
Omitting units for memory values
4fill in blank
hard

Fill both blanks to set CPU request and limit correctly.

Kubernetes
resources:
  requests:
    cpu: [1]
  limits:
    cpu: [2]
Drag options to blanks, or click blank then click option'
A250m
B500m
C1
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Setting request higher than limit
Using memory units for CPU
5fill in blank
hard

Fill all three blanks to set memory request, memory limit, and CPU limit correctly.

Kubernetes
resources:
  requests:
    memory: [1]
  limits:
    memory: [2]
    cpu: [3]
Drag options to blanks, or click blank then click option'
A128Mi
B256Mi
C500m
D1Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing CPU and memory units
Setting request higher than limit