Google Cloud Professional Cloud DevOps Engineer — Question 4

You have a set of applications running on a Google Kubernetes Engine (GKE) cluster, and you are using Stackdriver Kubernetes Engine Monitoring. You are bringing a new containerized application required by your company into production. This application is written by a third party and cannot be modified or reconfigured. The application writes its log information to /var/log/app_messages.log, and you want to send these log entries to Stackdriver Logging. What should you do?

Answer options

Correct answer: B

Explanation

The correct answer is B because deploying a Fluentd daemonset allows you to tailor the log collection specifically for the application logs without modifying the application itself. Options A and C do not allow for customization needed to access the specific log file, while option D involves modifying the pod environment, which is not feasible since the application cannot be changed.