Admission injected an Agent sidecar into every pod while the DaemonSet still scraped; series duplicated
The scenario
Cluster Agent admission started injecting a full Agent sidecar. The node DaemonSet still runs. Container series duplicated; cardinality 50x on kube clusters. Host metrics look 'richer.' Product wants sidecars 'for isolation.'
Model answer
What I'd say first:
I would go back to one Agent per node. Admission injecting a full Agent sidecar while the DaemonSet still scrapes duplicates container series and can blow cardinality fifty times. Isolation is not an excuse to clone.
How I'd work it:
- 1Remove sidecars or remove the DaemonSet. Admission should inject DD_AGENT_HOST or a library, not a second Agent.
- 2Confirm duplicate container series and the bill. Host metrics looking richer is the clone.
- 3Do not keep both and dedupe at intake by fingerprint. Dedupe is a bandage. Stop emitting clones.
- 4Tell productsidecar plus DaemonSet is install topology, not more visibility.
How I'd explain it:
One Agent per node is the contract. A wrong answer sounds like raise quota or dedupe at intake. Intake should not be a garbage collector for a webhook mistake.
How I'd prevent it:
Webhook test that injected pods do not run a second datadog-agent container when the DaemonSet exists. Operator detects dual install. Onboarding refuses sidecar plus DaemonSet and pages us in dogfood when container series clone. Isolation is not a second Agent.
The follow-up they'll ask
“Keep both and dedupe at intake by fingerprint?”
Do not keep both and dedupe at intake by fingerprint. Dedupe is a bandage and will miss edge tags. Stop emitting clones. One Agent per node. Admission injects host or library, not another Agent. Fingerprints will not save the cardinality budget.
Common mistakes
- Keeping both
- Dedupe at intake
- Raising quota
- Isolation as excuse