Google Cloud Associate Cloud Engineer — Question 30
You are creating a Google Kubernetes Engine (GKE) cluster with a cluster autoscaler feature enabled. You need to make sure that each node of the cluster will run a monitoring pod that sends container metrics to a third-party monitoring solution. What should you do?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B, as a DaemonSet ensures that a copy of the pod runs on each node in the cluster, which is ideal for monitoring purposes. Option A is incorrect because a StatefulSet is used for stateful applications and does not guarantee deployment on every node. Option C is not suitable as a Deployment manages a set of identical pods and does not ensure that each node runs the monitoring pod. Option D is incorrect as cluster initializers do not manage pod deployment effectively.