Skip to content

Commit f47c6c4

Browse files
chore(doc): admonition for API saturation risk (#4955)
* chore(doc): admonition for API saturation risk Added caution about Kubernetes API saturation risk when running Alloy as a DaemonSet, along with recommended solutions * chore(doc): Reviewed message for discovery.kubernetes Using a simpler message to document the possible API load Co-authored-by: Clayton Cornell <[email protected]> --------- Co-authored-by: Clayton Cornell <[email protected]>
1 parent 0caed44 commit f47c6c4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/sources/reference/components/discovery/discovery.kubernetes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ It watches cluster state, and ensures targets are continually synced with what's
1818
If you supply no connection information, this component defaults to an in-cluster configuration.
1919
A kubeconfig file or manual connection settings can be used to override the defaults.
2020

21+
## Performance considerations
22+
23+
By default, `discovery.kubernetes` discovers resources across all namespaces in your cluster.
24+
In DaemonSet deployments, this means every {{< param "PRODUCT_NAME" >}} Pod watches all resources, which can increase API server load.
25+
26+
For better performance and reduced API load:
27+
28+
- Use the [`namespaces`](#namespaces) block to limit discovery to specific namespaces.
29+
- Use [`selectors`](#selectors) to filter resources by labels or fields.
30+
- Consider the node-local example in [Limit to only Pods on the same node](#limit-to-only-pods-on-the-same-node).
31+
- Use clustering mode for larger deployments to distribute the discovery load.
32+
- Monitor API server metrics like request rate, throttling, and memory usage, especially on managed clusters.
33+
2134
## Usage
2235

2336
```alloy

0 commit comments

Comments
 (0)