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?
The adapter pattern modifies or transforms data from the main container to match external interfaces. Here, the sidecar converts logs to metrics.
Why this answer
Option A is correct. The adapter pattern transforms the main container's output (e.g., logs) into a format expected by an external system (e.g., Prometheus metrics). The sidecar pattern adds functionality without modifying the main container; ambassador patterns proxy external connections; init containers run before the main containers start.