-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for static Pods log scraping configuration (#593)
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Static Pods | ||
|
||
## Background | ||
|
||
In some scenarios, Pods cannot be annotated for log collection, particularly in cases involving static Pod manifests (such as kube-apiserver). This document describes a mechanism to configure log scraping for these Pods without requiring changes to their manifests. | ||
|
||
### Proposed Solution | ||
|
||
Introduce a configuration block that specifies which Pod log targets should be collected. When a target configuration matches a static Pod, the appropriate logs will be included in the overall log collection pipeline. | ||
|
||
## Configuration | ||
|
||
A sample configuration that aims to scrape kube-apiserver logs is provided below. The configuration itself remains unchanged: | ||
|
||
```toml | ||
[[host-log.static-pod-target]] | ||
namespace = "kube-system" | ||
label-targets = { "component" = "kube-apiserver" } | ||
container = "apiserver" | ||
log-type = "kubernetes" | ||
database = "Logs" | ||
table = "KubeAPIServer" | ||
parsers = ["klog"] | ||
``` |