0
0
Kubernetesdevops~10 mins

Resource monitoring best practices 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 specify CPU resource requests in a Kubernetes pod spec.

Kubernetes
resources:
  requests:
    cpu: "[1]"
Drag options to blanks, or click blank then click option'
A0.5
B5cpu
C500m
D500
Attempts:
3 left
💡 Hint
Common Mistakes
Using '5cpu' or '0.5' without 'm' causes errors.
Using '500' without 'm' is interpreted as 500 cores, which is invalid.
2fill in blank
medium

Complete the code to specify memory limits in a Kubernetes container spec.

Kubernetes
resources:
  limits:
    memory: "[1]"
Drag options to blanks, or click blank then click option'
A512Mi
B512
C512MB
D0.5Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Using '512' without units causes errors.
Using '512MB' is invalid in Kubernetes.
3fill in blank
hard

Fix the error in the resource request syntax for CPU in this pod spec snippet.

Kubernetes
resources:
  requests:
    cpu: [1]
Drag options to blanks, or click blank then click option'
A1000m
B1
C"1"
D"1000m"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes causes YAML parsing errors.
Using numeric values without units is invalid.
4fill in blank
hard

Fill both blanks to create a resource limit and request for memory in a container spec.

Kubernetes
resources:
  limits:
    memory: "[1]"
  requests:
    memory: "[2]"
Drag options to blanks, or click blank then click option'
A1Gi
B512Mi
C256Mi
D2Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Setting requests higher than limits causes scheduling errors.
Using inconsistent units can confuse resource allocation.
5fill in blank
hard

Fill all three blanks to define CPU and memory requests and limits correctly in a pod spec.

Kubernetes
resources:
  requests:
    cpu: "[1]"
    memory: "[2]"
  limits:
    cpu: "[3]"
Drag options to blanks, or click blank then click option'
A250m
B256Mi
C500m
D1Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Setting limits lower than requests causes errors.
Mixing units incorrectly leads to resource misallocation.