From 152b516d39688b5cbe352adca66c96237c91abca Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:12:14 -0500 Subject: [PATCH] Update troubleshooting.asciidoc (#1573) (#1575) * Update troubleshooting.asciidoc Added info about what to look for if an agent gets reenrolled on a Kubernetes cluster * Update docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc * Update docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc * Update docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc --------- Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> (cherry picked from commit 300b6602553cfdab28aa840176ec07294ff13e62) Co-authored-by: BBQigniter (cherry picked from commit 6731d83e9b0d44acd1b9519c45e14b6e23dc918f) --- .../troubleshooting/troubleshooting.asciidoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc b/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc index b11c29c1e..188e742ae 100644 --- a/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc +++ b/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc @@ -61,6 +61,7 @@ Find troubleshooting information for {fleet}, {fleet-server}, and {agent} in the * <> * <> * <> +* <> [discrete] @@ -963,3 +964,13 @@ Extra resources for {agent} on Kubernetes troubleshooting and information: * https://github.com/elastic/elastic-agent/tree/main/deploy/kubernetes/elastic-agent-kustomize/default[{agent} Kustomize Templates] documentation and resources. * Other examples and manifests to deploy https://github.com/elastic/elastic-agent/tree/main/deploy/kubernetes[{agent} on Kubernetes]. + +[discrete] +[[agent-kubernetes-invalid-api-key]] +== Troubleshoot {agent} on Kubernetes seeing `invalid api key to authenticate with fleet` in logs + +If an agent was unenrolled from a Kubernetes cluster, there might be data remaining in `/var/lib/elastic-agent-managed/kube-system/state` on the node(s). Reenrolling an agent later on the same nodes might then result in `invalid api key to authenticate with fleet` error messages. + +To avoid these errors, make sure to delete this state-folder before enrolling a new agent. + +For more information, refer to issue link:https://github.com/elastic/elastic-agent/issues/3586[#3586].