Collector Deployment Patterns and Kubernetes: OTCA practice questions
The Collector ships as a single binary, and the documentation describes several ways to place it. In the simplest arrangement there is no Collector at all: each SDK exports straight to a backend.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Collector Deployment Patterns and Kubernetes covers in OTCA
The Collector ships as a single binary, and the documentation describes several ways to place it. In the simplest arrangement there is no Collector at all: each SDK exports straight to a backend. That is quick to set up and has no extra moving parts, but any change to collection or processing means changing application code, the application becomes coupled to the backend, and each language offers only a limited set of exporters.
In the agent pattern, the application sends OTLP to a Collector running next to it or on the same host, typically as a sidecar or a DaemonSet in Kubernetes. The docs list its strengths as being easy to start and giving a clear one-to-one mapping between application and Collector, and its weaknesses as limited scalability and inflexibility for complex or evolving setups.
In the gateway pattern, applications or agents send to a single OTLP endpoint served by one or more standalone Collector instances, often one endpoint per cluster, data center or region. Its benefits are separation of concerns, such as credentials managed in one place, and central policy for filtering or sampling. The costs are another component that can fail, added latency when Collectors are chained, and higher resource use. When data must reach one particular Collector, as tail sampling needs, the docs describe a two-tier gateway: the first tier runs the load-balancing exporter so that every span of a trace lands on the same second-tier instance.
On Kubernetes there are two official installation paths. The OpenTelemetry Operator, which needs cert-manager installed first, manages Collectors through the OpenTelemetryCollector custom resource and also handles auto-instrumentation. Its spec.mode can be deployment, daemonset, statefulset or sidecar, and deployment is the default. Sidecar mode injects the Collector into pods that carry the sidecar.opentelemetry.io/inject annotation, which belongs on the pod template rather than on the Deployment object. The Helm chart is the other path. It requires mode to be set to daemonset, deployment or statefulset and offers presets that wire up RBAC, volumes and components. For example, the cluster metrics preset is recommended with a single-replica deployment, because several copies of the cluster receiver would emit duplicate data.
Whatever the topology, the Kubernetes attributes processor is the key enrichment step for application telemetry. It watches pods through the Kubernetes API and, by default, matches incoming data to a pod by the connection IP, then adds resource attributes such as k8s.pod.name and k8s.namespace.name. Agents should restrict discovery to their own node with filter.node_from_env_var and a node name injected through the downward API. When a gateway sits behind agents, the agents can run the processor in passthrough mode so the original pod IP travels with the data.
Key points
- No Collector is simplest, but processing changes then require application code changes.
- An agent runs beside the workload, such as a sidecar or DaemonSet; a gateway is a shared standalone endpoint.
- Tail sampling behind a gateway needs a first tier with the load-balancing exporter routing by trace ID.
- The Operator OpenTelemetryCollector resource supports deployment, daemonset, statefulset and sidecar modes, with deployment as the default.
- The Helm chart requires mode to be daemonset, deployment or statefulset.
- The k8sattributes processor associates data with pods by connection IP unless other rules are configured.
Three sample questions
17 OTCA questions on Collector Deployment Patterns and Kubernetes, 17 with explanations. How practice works
Question 1
- A.Alongside the application or on the same host, such as a sidecar or DaemonSet
- B.In a central regional cluster behind an external load balancer only
- C.Inside the application process as a library loaded by the SDK
- D.In the observability backend, which embeds the Collector receivers
Correct answer: A
Sources: OpenTelemetry docs: Agent deployment pattern, OpenTelemetry docs: Collector architecture
Question 2
- A.Lower latency, because data skips the extra Collector hop
- B.Lower overall resource usage than an agent-only setup
- C.Separation of concerns, e.g. centrally held credentials
- D.Fewer moving parts to maintain than sending data directly
Correct answer: C
Sources: OpenTelemetry docs: Gateway deployment pattern, OpenTelemetry docs: Deploy the Collector
Question 3
- A.Applications cannot use OTLP at all unless a Collector is in the path
- B.Logs cannot be exported unless a Collector is deployed
- C.Telemetry is always sampled at 10% by the SDK by default
- D.Changing collection or processing needs requires code changes
Correct answer: D
Sources: OpenTelemetry docs: No Collector deployment pattern, OpenTelemetry docs: Agent deployment pattern
Practice this topic
Focus mode keeps every question on Collector Deployment Patterns and Kubernetes until you leave it. 10 free guest answers, then a free account; no credit card.
Or open OTCA practice across all topics.
Sources
The explanation above was checked against these official documents.
- OpenTelemetry docs: Agent deployment pattern (checked 2026-10-28)
- OpenTelemetry docs: Gateway deployment pattern (checked 2026-10-28)
- OpenTelemetry docs: No Collector deployment pattern (checked 2026-10-28)
- OpenTelemetry docs: OpenTelemetry Operator for Kubernetes (checked 2026-10-28)
- OpenTelemetry Operator docs: Collector deployment modes (checked 2026-10-28)
- OpenTelemetry Operator docs: Sidecar injection (checked 2026-10-28)
- OpenTelemetry docs: OpenTelemetry Collector Helm chart (checked 2026-10-28)
- Collector contrib README: Kubernetes attributes processor (checked 2026-10-28)
Frequently asked questions
Where does the sidecar injection annotation go for a Deployment?
On the pod template metadata. The Operator docs mark an annotation on the Deployment object itself as wrong.