
Answer-first summary for fast verification
Answer: Deploy the monitoring pod in a DaemonSet object.
The correct answer is B. Deploying the monitoring pod in a DaemonSet object ensures that one running instance of the pod is scheduled on every node in the cluster. This approach guarantees that even if the cluster autoscaler scales the cluster up or down, the monitoring pod will continue to run on each node. Deploying the monitoring pod in a StatefulSet (option A) or Deployment (option C) object is not necessary and can complicate scaling. Referencing the monitoring pod in a cluster initializer (option D) is not the best practice as it becomes difficult to update and does not ensure the monitoring pod runs on every node.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are tasked with setting up a Google Kubernetes Engine (GKE) cluster and enabling the cluster autoscaler feature to manage the scalability of the cluster. An important requirement is to ensure that each node within this GKE cluster runs a monitoring pod capable of sending container metrics to a third-party monitoring solution. What steps should you take to achieve this configuration?
A
Deploy the monitoring pod in a StatefulSet object.
B
Deploy the monitoring pod in a DaemonSet object.
C
Reference the monitoring pod in a Deployment object.
D
Reference the monitoring pod in a cluster initializer at the GKE cluster creation time.