Bird
0
0

Given this LimitRange YAML applied in a namespace:

medium📝 Command Output Q13 of 15
Kubernetes - Namespaces
Given this LimitRange YAML applied in a namespace:
apiVersion: v1
kind: LimitRange
metadata:
  name: mem-default
spec:
  limits:
  - default:
      memory: 256Mi
    type: Container

What will be the memory request for a container without any memory request specified?
ANo memory request will be set
BPod creation will fail due to missing memory request
CMemory request will be unlimited
D256Mi memory request will be applied by default
Step-by-Step Solution
Solution:
  1. Step 1: Understand default in LimitRange

    The default memory value sets the memory request if the container does not specify one.
  2. Step 2: Apply to container without memory request

    Since the container has no memory request, Kubernetes applies the default 256Mi memory request from LimitRange.
  3. Final Answer:

    256Mi memory request will be applied by default -> Option D
  4. Quick Check:

    Default resource applies if container omits it [OK]
Quick Trick: Default applies only if container omits resource request [OK]
Common Mistakes:
  • Assuming no default means no request
  • Thinking pod creation fails without explicit request
  • Confusing default with max or min limits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes