0
0
Kubernetesdevops~10 mins

Memory 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 memory request of 256Mi for the container.

Kubernetes
resources:
  requests:
    memory: [1]
Drag options to blanks, or click blank then click option'
A256MB
B256Mi
C256
D256Kb
Attempts:
3 left
💡 Hint
Common Mistakes
Using '256MB' instead of '256Mi'.
Omitting units like 'Mi'.
2fill in blank
medium

Complete the code to set a memory limit of 512Mi for the container.

Kubernetes
resources:
  limits:
    memory: [1]
Drag options to blanks, or click blank then click option'
A512Mi
B512MB
C512
D512Kb
Attempts:
3 left
💡 Hint
Common Mistakes
Using '512MB' which is not recognized.
Leaving out units.
3fill in blank
hard

Fix the error in the memory request value to use the correct unit.

Kubernetes
resources:
  requests:
    memory: [1]
Drag options to blanks, or click blank then click option'
A128
B128MB
C128Mi
D128Kb
Attempts:
3 left
💡 Hint
Common Mistakes
Using '128MB' instead of '128Mi'.
Omitting units.
4fill in blank
hard

Fill both blanks to set memory requests and limits correctly.

Kubernetes
resources:
  requests:
    memory: [1]
  limits:
    memory: [2]
Drag options to blanks, or click blank then click option'
A256Mi
B512Mi
C256MB
D512MB
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'MB' units.
Setting limits smaller than requests.
5fill in blank
hard

Fill all three blanks to define a container with memory requests and limits.

Kubernetes
containers:
- name: app
  resources:
    requests:
      memory: [1]
    limits:
      memory: [2]
  image: myapp:latest
  env:
    - name: ENV_VAR
      value: [3]
Drag options to blanks, or click blank then click option'
A128Mi
B256Mi
C"production"
D"dev"
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory units incorrectly.
Not quoting environment variable values.