Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to request 4 CPUs for a Kubernetes pod.
MLOps
resources:
requests:
cpu: [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory units instead of CPU
Specifying CPU as a string with units like '4m'
✗ Incorrect
Setting cpu: 4 requests 4 CPUs for the pod.
2fill in blank
mediumComplete the command to check current GPU usage on a node.
MLOps
nvidia-smi [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
--list-gpus which only lists GPUsUsing
--version which shows version info✗ Incorrect
The --query-gpu=memory.used option shows GPU memory usage.
3fill in blank
hardFix the error in the YAML to limit memory to 8Gi.
MLOps
resources:
limits:
memory: [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
8GB which is invalidUsing lowercase
g instead of Gi✗ Incorrect
Memory limits in Kubernetes use binary SI units like Gi, so 8Gi is correct.
4fill in blank
hardFill both blanks to create a resource request for 2 CPUs and 4Gi memory.
MLOps
resources:
requests:
cpu: [1]
memory: [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing CPU and memory units
Using incorrect memory units like
GB✗ Incorrect
Requesting 2 CPUs and 4Gi memory uses cpu: 2 and memory: 4Gi.
5fill in blank
hardFill all three blanks to define a pod with 1 CPU request, 2Gi memory request, and 1 GPU request.
MLOps
resources:
requests:
cpu: [1]
memory: [2]
nvidia.com/gpu: [3] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory units for CPU or GPU
Incorrect GPU key name
✗ Incorrect
The pod requests 1 CPU, 2Gi memory, and 1 GPU using the correct keys and values.