In Kubernetes, resource quantities must be expressed using specific, well-defined units. When requesting ephemeral storage, Kubernetes follows the same quantity format rules as other resources such as memory. These rules distinguish between binary units (base-2) and decimal units (base-10), and the correct unit must be used to avoid configuration errors or unintended resource allocation.
The term mebibyte (MiB) is a binary unit equal to 2²⁰ bytes (1,048,576 bytes). Kubernetes represents mebibytes using the suffix Mi with a capital “M” and lowercase “i”. Therefore, a request for 500 mebibytes of ephemeral storage must be written as 500Mi, making option A the correct answer.
Option B, 500mi, is incorrect because Kubernetes resource units are case-sensitive. The lowercase mi is not a valid unit and will be rejected by the API server. Option C, 500m, is also incorrect because the suffix m represents millicpu when used with CPU resources and has no meaning for storage quantities. Using m for ephemeral storage would result in a validation error. Option D, 0.5M, is incorrect because M represents a decimal megabyte (10⁶ bytes), not a mebibyte, and Kubernetes best practices require binary units for memory-based resources like ephemeral storage.
Ephemeral storage requests are typically defined under the container’s resources.requests.ephemeral-storage field. Correctly specifying the unit ensures that the scheduler can accurately account for node storage capacity and enforce eviction thresholds when necessary.
In summary, Kubernetes requires precise, case-sensitive units for resource specifications. Since the question explicitly asks for 500 mebibytes, the only valid and correct representation is 500Mi, which aligns exactly with Kubernetes resource quantity conventions.