App runs in multiple GKE clusters under a Deployment with replicas. Which command shows stdout logs for all replicas across clusters?
Choose an answer
Tap an option to check your answer.
Correct answer: gcloud logging read [PARAM].
Why this is the answer
The gcloud logging read command is the correct choice because Google Kubernetes Engine (GKE) integrates with Google Cloud's operations suite (formerly Stackdriver), which centralizes logs from all pods across all clusters. This command allows you to query and view these aggregated logs efficiently. kubectl logs is incorrect because it only retrieves logs from pods within the current Kubernetes cluster context, not across multiple clusters. kubectl exec -it [POD] -- journalctl is incorrect as journalctl is a Linux system utility for viewing systemd journal logs, not application logs from within a container, and it also only applies to a single pod in the current cluster. gcloud compute ssh [INSTANCE] --command='sudo journalctl' is incorrect because it accesses logs directly on a virtual machine instance, which is not how you typically access container logs in GKE, and it also doesn't aggregate logs across multiple clusters or pods.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed