Kubernetes MCQs – Monitoring, Logging, and Debugging

21.) Which monitoring tool can be deployed via Helm charts in Kubernetes?

A) Prometheus
B) Fluentd
C) Loki
D) All of the above

Answer: Option D

Explanation: Helm charts are available for deploying Prometheus, Fluentd, Loki, and more.

22.) How can you get events related to a specific pod?

A) kubectl get events –pod <pod-name>
B) kubectl logs events
C) kubectl describe pod <pod-name>
D) kubectl get pod-events

Answer: Option C

Explanation: Describing a pod shows events associated with it.

23.) What does the -n flag specify in commands like kubectl logs -n kube-system?

A) Namespace
B) Node logs
C) New logs
D) Notification level

Answer: Option A

Explanation: -n or –namespace targets a specific namespace for commands.

24.) Which component aggregates and sends container logs to Elasticsearch?

A) Fluentd
B) Prometheus
C) Grafana
D) kube-proxy

Answer: Option A

Explanation: Fluentd is commonly used to forward logs to backends like Elasticsearch.

25.) Which of the following is a benefit of using Loki for logging in Kubernetes?

A) Uses SQL for querying logs
B) Integrates natively with Prometheus labels
C) Replaces Prometheus
D) Monitors network policies

Answer: Option B

Explanation: Loki stores logs and uses Prometheus-style labeling for correlation.

Leave a Reply

Your email address will not be published. Required fields are marked *