Monitoring and Logging Flashcards
7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Monitoring and Logging flashcards as text
Which Kubernetes object exposes metrics in Prometheus format for cluster-level resource usage?
Answer: kube-state-metrics
kube-state-metrics exposes cluster-level metrics about Kubernetes objects (deployments, pods, nodes) in Prometheus format, distinct from resource usage metrics.
What is the default log driver used by Docker (and many container runtimes) when no driver is specified?
Answer: json-file
The json-file driver is the default Docker log driver, writing container logs as JSON to files on the host filesystem.
In a Kubernetes cluster, where are container logs stored on the node by default?
Answer: /var/log/pods/
Kubernetes stores container logs under /var/log/pods/ on each node, organized by namespace, pod name, and container name.
Which CNCF project provides a vendor-neutral observability framework for generating, collecting, and exporting telemetry data?
Answer: OpenTelemetry
OpenTelemetry (OTel) is the CNCF standard for instrumenting, generating, collecting, and exporting telemetry (metrics, logs, traces) in a vendor-neutral way.
What does the `kubectl top nodes` command rely on to return resource usage data?
Answer: metrics-server
kubectl top nodes queries the Metrics API, which is typically served by metrics-server aggregating cAdvisor data from each node.
Which log aggregation pattern involves running a dedicated logging container alongside the application container in the same pod?
Answer: Sidecar pattern
The sidecar pattern places a log-forwarding container (e.g., Fluent Bit) in the same pod to collect and ship the application container's logs.
In Prometheus, what type of metric would you use to track the total number of HTTP requests served since startup?
Answer: Counter
A Counter is a monotonically increasing metric ideal for tracking cumulative totals like total HTTP requests, errors, or completed tasks.