Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Rephrase the Nginx example to avoid ambiguity; the Nginx integration
is not required for the routing purpose.

Update the pod labels table to avoid ambiguity about the target
namespace; it's the data stream namespace, not the k8s namespace.
  • Loading branch information
zmoog committed Sep 5, 2023
1 parent 4b52f34 commit f026f36
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 3 additions & 1 deletion packages/kubernetes/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ This defaults to `/var/log/containers/*${kubernetes.container.id}.log`.

#### Routing

The container-logs data stream allows routing logs to a different *dataset* or *namespace* using pod labels. For example, by setting the pod label `elastic.co/dataset: nginx`, the integration will send all the container logs to the `nginx` dataset.
The container-logs data stream allows routing logs to a different *dataset* or *namespace* using pod labels.

For example, suppose you are running Nginx on your Kubernetes cluster, and you want to drive the Nginx container logs into a dedicated dataset or namespace. By setting the pod label `elastic.co/namespace: nginx`, the integration will send all the container logs to the `nginx` namespace.

To learn more about routing container-logs, see https://docs.elastic.co/integrations/kubernetes/container-logs.

Expand Down
8 changes: 4 additions & 4 deletions packages/kubernetes/_dev/build/docs/container-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ kubectl -n kube-system label pods elastic-agent-managed-daemonset-6p22g elastic.
Here are the labels available for customization:


| Label | Description |
| ---------------------- | -------------------------------------------- |
| `elastic.co/dataset` | Defines the target dataset for this pod. |
| `elastic.co/namespace` | Defines the target namespace for this pod. |
| Label | Description |
| ---------------------- | -------------------------------------------------------- |
| `elastic.co/dataset` | Defines the target data stream's dataset for this pod. |
| `elastic.co/namespace` | Defines the target data stream's namespace for this pod. |
4 changes: 3 additions & 1 deletion packages/kubernetes/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ This defaults to `/var/log/containers/*${kubernetes.container.id}.log`.

#### Routing

The container-logs data stream allows routing logs to a different *dataset* or *namespace* using pod labels. For example, by setting the pod label `elastic.co/dataset: nginx`, the integration will send all the container logs to the `nginx` dataset.
The container-logs data stream allows routing logs to a different *dataset* or *namespace* using pod labels.

For example, suppose you are running Nginx on your Kubernetes cluster, and you want to drive the Nginx container logs into a dedicated dataset or namespace. By setting the pod label `elastic.co/namespace: nginx`, the integration will send all the container logs to the `nginx` namespace.

To learn more about routing container-logs, see https://docs.elastic.co/integrations/kubernetes/container-logs.

Expand Down
8 changes: 4 additions & 4 deletions packages/kubernetes/docs/container-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ kubectl -n kube-system label pods elastic-agent-managed-daemonset-6p22g elastic.
Here are the labels available for customization:


| Label | Description |
| ---------------------- | -------------------------------------------- |
| `elastic.co/dataset` | Defines the target dataset for this pod. |
| `elastic.co/namespace` | Defines the target namespace for this pod. |
| Label | Description |
| ---------------------- | -------------------------------------------------------- |
| `elastic.co/dataset` | Defines the target data stream's dataset for this pod. |
| `elastic.co/namespace` | Defines the target data stream's namespace for this pod. |

0 comments on commit f026f36

Please sign in to comment.