Developers on a county OKE cluster want kubectl logs and later platform collectors to see application messages from a containerized service. Where should the process write those messages?
Select an answer to reveal the explanation.
Short Explanation
On a cluster, treat logs like a live radio broadcast: write to stdout/stderr so the platform can tune in. Hiding messages in a private file inside the container is like whispering in a locked room—kubectl logs never hears them.
Full Explanation
On a county OKE cluster, application messages meant for kubectl logs and later platform collectors must go to the container process’s standard output and standard error. Kubernetes treats stdout/stderr as the primary container log stream; the kubelet and logging agents capture that stream so operators and observability tools can follow it without custom node scrapers. Structured logging to those streams keeps municipal services observable with the same tools used across namespaces.
Writing only to a private file under /var/log inside the container filesystem fails by concept because that path is invisible to kubectl logs and to collectors that expect the container log pipeline—messages stay trapped in the ephemeral container filesystem. A hostPath mount that each node scrapes independently fails because hostPath couples logging to node layout, complicates multi-node scheduling, and bypasses the standard stream model the platform already provides. An email SMTP relay configured in Deployment annotations fails because annotations are not a log transport and SMTP is an alerting or notification channel, not the continuous application log stream.
Exam caveat: stdout alone does not configure OCI Logging or APM destinations—those are wired later—but emitting the stream is the OKE prerequisite; without it, collectors have nothing to ship. Operational check: reproduce an error path in a Pod, run kubectl logs on the container, confirm the message appears without exec’ing into the filesystem, then verify the same lines reach your cluster log destination after the collector is attached.