Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
[role="xpack"]
=== Run {agent} on Kubernetes

You can use {agent} https://www.docker.elastic.co/r/beats/elastic-agent[Docker images] on Kubernetes to
Use {agent} https://www.docker.elastic.co/r/beats/elastic-agent[Docker images] on Kubernetes to
retrieve cluster metrics.

ifeval::["{release-state}"=="unreleased"]

However, version {version} of {agent} has not yet been
released, so no Docker image is currently available for this version.
A Docker image is not currently available for this version, as version {version} of {agent} has not yet been released.

endif::[]


[float]
==== Kubernetes deploy manifests

You deploy {agent} in two different ways at the same time:
Deploy {agent} in two different ways at the same time:

* As a https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/[DaemonSet]
to ensure that there's a running instance on each node of the cluster. These
Expand All @@ -32,24 +31,23 @@ running, deploy it now (see the
https://github.com/kubernetes/kube-state-metrics#kubernetes-deployment[Kubernetes
deployment] docs)

Everything is deployed under the `kube-system` namespace by default. To change
the namespace, modify the manifest file.
Everything is deployed under the `kube-system` namespace by default. Change the namespace by modifying the manifest file.

To download the manifest file, run:
Download the manifest file by running:

["source", "sh", subs="attributes"]
------------------------------------------------
curl -L -O https://raw.githubusercontent.com/elastic/beats/{branch}/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml
------------------------------------------------

This manifest includes Kubernetes integration to collect Kubernetes metrics,
System integration to collect system level metrics/logs from nodes and
Pod's log collection using <<kubernetes-provider,dynamic inputs and kubernetes provider>>.
This manifest includes the Kubernetes integration to collect Kubernetes metrics,
System integration to collect system level metrics and logs from nodes, and
the Pod's log collection using <<kubernetes-provider,dynamic inputs and kubernetes provider>>.

[float]
==== Settings

User need to set Elasticsearch settings before deploying the manifest:
Set the Elasticsearch settings before deploying the manifest:

[source,yaml]
------------------------------------------------
Expand All @@ -64,10 +62,10 @@ User need to set Elasticsearch settings before deploying the manifest:
[float]
===== Running {agent} on master nodes

Kubernetes master nodes can use https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[taints]
Kubernetes master nodes use https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[taints]
to limit the workloads that can run on them. The manifest for standalone {agent} defines
tolerations so as to run on master nodes too and being able to collect metrics from the control plane
components of Kuberentes (scheduler, controller manager)
tolerations to run on master nodes, which collects metrics from the control plane
components of Kuberentes (scheduler, controller manager).
Comment thread
leahleahy marked this conversation as resolved.
To disable {agent} from running on master nodes remove the following part of the Daemonset spec:

[source,yaml]
Expand Down Expand Up @@ -103,9 +101,9 @@ elastic-agent-hs4pb 1/1 Running 0 81m
[float]
==== Autodiscover targeted Pods
Comment thread
leahleahy marked this conversation as resolved.

It is possible to define autodiscover conditions so as to allow {agent} to automatically
identify Pods and start collecting from them using predefined integrations. For example if a
user want to automatically identify a Redis Pod and start monitoring it using the Redis integration
You can define autodiscover conditions to allow {agent} to automatically
identify Pods and start collecting from them using predefined integrations. For example, if a
user wants to automatically identify a Redis Pod and start monitoring it using the Redis integration,
the following configuration should be added as an extra input in the Daemonset manifest:

[source,yaml]
Expand Down Expand Up @@ -135,4 +133,4 @@ the following configuration should be added as an extra input in the Daemonset m
------------------------------------------------

Users can find more information about how to shape their dynamic inputs
for autodiscover at <<kubernetes-provider,dynamic inputs and kubernetes provider>> docs.
for autodiscover at <<kubernetes-provider,dynamic inputs and kubernetes provider>> docs.