From a5d725dd5a6fd0fb8708564e8feb01d11c06fc9b Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:50:35 -0500 Subject: [PATCH] Add troubleshooting for Agent Out of Memory on K8s (#842) * Add troubleshooting for Agent Out of Memory on K8s * Fixup (cherry picked from commit eed5a20a5ce6ecfa9eb394e6744e8157961b915c) --- .../troubleshooting/troubleshooting.asciidoc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc b/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc index d036ec613..1f1177c27 100644 --- a/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc +++ b/docs/en/ingest-management/troubleshooting/troubleshooting.asciidoc @@ -713,4 +713,21 @@ The final command will install {agent}. For example: sudo ./elastic-agent install --url=https://fleet-server:8220 --enrollment-token=bXktc3VwZXItc2VjcmV0LWVucm9sbWVudC10b2tlbg== ---- -After running these steps your {agents} should be able to connect with {fleet} again. \ No newline at end of file +After running these steps your {agents} should be able to connect with {fleet} again. + +[discrete] +[[agent-oom-k8s]] +== {agent} Out of Memory errors on Kubernetes + +In a Kubernetes environment, {agent} may be terminated with reason `OOMKilled` due to inadequate available memory. + +To detect the problem, run the `kubectl describe pod` command and check the results for the following content: + +[source,sh] +---- + Last State: Terminated + Reason: OOMKilled + Exit Code: 137 +---- + +To resolve the problem, allocate additional memory to the agent and then restart it.