Courseiva

CKAD Application Design and Build Practice Question

You have a Pod that runs a web server and you want to add a sidecar container that exposes a Prometheus metrics endpoint by scraping the web server's logs. Which sidecar pattern does this exemplify?

⚠ Common exam trap

The trap is confusing the Adapter pattern with the Ambassador pattern; candidates may think any sidecar that communicates externally is an Ambassador, but Adapter specifically transforms data format, while Ambassador proxies network traffic.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Adapter pattern

The Adapter pattern is a sidecar pattern where the sidecar container transforms or adapts the main container's output into a format consumable by an external system. Here, the sidecar scrapes the web server's logs and exposes them as Prometheus metrics, adapting log data into a metrics endpoint. This is a classic example of the Adapter pattern.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Sidecar pattern (generic)

    Why it's wrong here

    The sidecar pattern is a general architectural approach where a helper container runs alongside the main container in the same pod, sharing its lifecycle and resources. While the described helper is indeed a sidecar, it specifically implements the adapter pattern because it transforms data from the main container into a different format. Labeling it merely as a 'sidecar' omits the critical behavior of output normalization, which is what makes it an adapter.

  • ✓

    Adapter pattern

    Why this is correct

    The adapter pattern is a sidecar specialization that modifies or transforms data produced by the main container to match an external interface expected by consumers. In this scenario, the sidecar reads the web server's raw logs and converts them into structured metrics (e.g., request count, latency) that a monitoring system can ingest. This is the correct classification because the core action is data format conversion, not generic process execution or network proxying.

  • ✗

    Ambassador pattern

    Why it's wrong here

    The ambassador pattern places a proxy sidecar in front of the main container to handle network communication with external services—managing connections, load balancing, retries, and TLS termination. It does not transform the content or data produced by the application; instead, it relays requests and responses unchanged. Since the described sidecar converts logs to metrics, it is performing data transformation, not network proxying, so the ambassador pattern does not fit.

  • ✗

    Init container pattern

    Why it's wrong here

    Init containers in Kubernetes run sequentially before the primary container starts and must complete successfully before the main app begins. They are short-lived and cannot continuously consume or transform data from the main container because they are not running concurrently with it. The described log-to-metrics sidecar runs long after pod startup and remains active throughout the pod's lifetime, making the init container pattern inapplicable.

About these practice questions

Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CNCF exam blueprint

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.