Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update running-on-kubernetes-standalone.asciidoc #521

Merged
merged 3 commits into from
Apr 20, 2021
Merged
Changes from 1 commit
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,26 +2,25 @@
[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
instances are used to retrieve most metrics from the host, such as system
metrics, Docker stats, and metrics from all the services running on top of
instances are used to retrieve metrics from the host, such as system
metrics, Docker stats, and metrics from all the services running on
leahleahy marked this conversation as resolved.
Show resolved Hide resolved
Kubernetes.

* As a single {agent} instance created using a https://kubernetes.io/docs/concepts/workloads/controllers/Deployment/[Deployment].
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).
leahleahy marked this conversation as resolved.
Show resolved Hide 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
leahleahy marked this conversation as resolved.
Show resolved Hide 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
Ddefine the autodiscover conditions to allow {agent} to automatically
bmorelli25 marked this conversation as resolved.
Show resolved Hide resolved
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.