0
0
Kubernetesdevops~10 mins

CPU 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 of 500m in the container spec.

Kubernetes
resources:
  requests:
    cpu: [1]
Drag options to blanks, or click blank then click option'
A500
B0.5
C1
D500m
Attempts:
3 left
💡 Hint
Common Mistakes
Using '0.5' instead of '500m' (equivalent, but task expects millicores notation).
Using '500' means 500 cores, which is too large.
2fill in blank
medium

Complete the code to set a CPU limit of 1 core in the container spec.

Kubernetes
resources:
  limits:
    cpu: [1]
Drag options to blanks, or click blank then click option'
A1
B1000m
C1m
D0.1
Attempts:
3 left
💡 Hint
Common Mistakes
Using '1m' means 0.001 CPU, which is too low.
Using '0.1' is valid but not the requested 1 core.
3fill in blank
hard

Fix the error in the CPU request value to be valid.

Kubernetes
resources:
  requests:
    cpu: [1]
Drag options to blanks, or click blank then click option'
A500
B500m
C0.5
Dfive hundred
Attempts:
3 left
💡 Hint
Common Mistakes
Using '500' means 500 cores, which is too large.
Using words like 'five hundred' is invalid.
4fill in blank
hard

Fill both blanks to set CPU request to 250m and CPU limit to 500m.

Kubernetes
resources:
  requests:
    cpu: [1]
  limits:
    cpu: [2]
Drag options to blanks, or click blank then click option'
A250m
B500m
C1
D100m
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping request and limit values.
Using whole numbers instead of millicores.
5fill in blank
hard

Fill all three blanks to set CPU request to 100m, CPU limit to 200m, and memory limit to 512Mi.

Kubernetes
resources:
  requests:
    cpu: [1]
  limits:
    cpu: [2]
    memory: [3]
Drag options to blanks, or click blank then click option'
A100m
B200m
C512Mi
D1Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Using '512M' instead of '512Mi' for memory.
Mixing CPU and memory units.