A city permitting microservice on OKE must keep uploaded PDF attachments across Pod restarts. Which Kubernetes object should the developer declare so the Pod receives durable storage provisioned by the cluster?
Select an answer to reveal the explanation.
Short Explanation
Think of a PVC like a reserved parking stall for your Pod’s disk: the claim asks the cluster for durable space, and OKE typically satisfies it with an OCI block volume. Most microservices should stay stateless; reach for a PVC only when files truly must survive restarts.
Full Explanation
For a city permitting microservice that must keep uploaded PDF attachments across Pod restarts, the durable path is a PersistentVolumeClaim (PVC) that binds to a StorageClass which, on OKE, typically provisions an OCI Block Volume. The PVC is the developer-facing request for persistent capacity; the controller provisions and attaches storage that outlives individual Pods, so attachments survive reschedule, crash, and rolling update when the claim and volume remain. That matches the municipal need to retain permit documents without rebuilding a file store from scratch after every Pod cycle.
A ConfigMap that mounts an attachment directory as environment variables fails by concept because ConfigMaps carry non-secret configuration data as keys and values, not a durable filesystem for binary PDFs. An emptyDir volume sized to the expected workload fails because emptyDir is ephemeral: its contents vanish when the Pod is removed from the node, so it cannot guarantee survival across restarts. A Secret that stores base64-encoded copies of each uploaded file fails because Secrets are for credentials and small sensitive values, not an application document store, and stuffing PDFs into Secret objects creates size, security, and operational anti-patterns.
Exam caveat: prefer keeping microservices as stateless as possible; reach for a PVC only when files truly must survive Pod lifetime—many civic APIs should put durable documents in Object Storage and keep the Pod ephemeral. Operational check: after declaring the PVC and mounting it, delete the Pod (not the PVC), re-upload a test PDF if needed, and confirm the same files remain when the replacement Pod remounts the claim before promoting the change in the permitting namespace.