A municipal API Pod needs a very fast scratch cache that vanishes when the Pod is deleted. Which emptyDir setting gives tmpfs-backed memory storage?
Select an answer to reveal the explanation.
Short Explanation
Think of emptyDir as a whiteboard on the Pod’s desk—usually disk chalk, but you can flip it to RAM. Setting medium to Memory parks that scratch space in tmpfs so the cache is blazing fast and gone when the Pod dies. No PVC required for throwaway speed.
Full Explanation
A municipal API Pod that needs a very fast scratch cache that vanishes when the Pod is deleted should set emptyDir.medium to Memory on the volume used for the cache path. That requests tmpfs-backed storage in RAM, giving low latency for ephemeral caches while ensuring contents disappear with the Pod—ideal for short-lived city API caches that must not spill durable disks.
Setting emptyDir.medium to SSD is not a valid Kubernetes medium value. Mounting hostPath of /dev/shm instead of declaring emptyDir couples you to node layout and bypasses the emptyDir abstraction. A PVC with ReadWriteOnce and a high-performance StorageClass provides durability and attach semantics you do not want for vanish-on-delete scratch.
Exam caveat: Memory emptyDir counts against container memory limits; sizeLimit helps bound usage. Data is lost on restart—even on the same node.
Operational check: mount medium: Memory at /cache; write a file; kubectl describe pod for the volume; delete the Pod and confirm data is gone; watch memory metrics under load. In municipal environments, document the chosen pattern in the service runbook so on-call engineers apply the same kubectl checks during incidents, and keep the change tied to the application Deployment or Job rather than ad-hoc node mutation.