You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eks_fargate/README.md
+157-4Lines changed: 157 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -552,7 +552,7 @@ spec:
552
552
- name: "<CONTAINER_NAME>"
553
553
image: "<CONTAINER_IMAGE>"
554
554
555
-
# Running the Agent as a side-car
555
+
# Running the Agent as a sidecar
556
556
- name: datadog-agent
557
557
image: gcr.io/datadoghq/agent:7
558
558
env:
@@ -689,7 +689,7 @@ spec:
689
689
- name: "<CONTAINER_NAME>"
690
690
image: "<CONTAINER_IMAGE>"
691
691
692
-
# Running the Agent as a side-car
692
+
# Running the Agent as a sidecar
693
693
- name: datadog-agent
694
694
image: gcr.io/datadoghq/agent:7
695
695
env:
@@ -852,7 +852,7 @@ spec:
852
852
- name: "<CONTAINER_NAME>"
853
853
image: "<CONTAINER_IMAGE>"
854
854
855
-
# Running the Agent as a side-car
855
+
# Running the Agent as a sidecar
856
856
- name: datadog-agent
857
857
image: gcr.io/datadoghq/agent:7
858
858
env:
@@ -881,6 +881,158 @@ spec:
881
881
882
882
## Log collection
883
883
884
+
### Collecting logs from EKS on Fargate natively with the Agent
885
+
886
+
Monitor EKS Fargate logs using the Datadog Agent to collect logs from the kubelet and ship them to Datadog.
887
+
888
+
1. The most convenient way to enable native kubelet logging is through the Cluster Agent's Admission Controller sidecar injection feature. When configured, all subsequent injected Agent containers automatically have kubelet logging enabled. This feature can also be configured manually in your Application's manifest.
Set the `DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_KUBELET_API_LOGGING_ENABLED` Cluster Agent environment variable to `true`, so newly injected Agent containers will have kubelet logging enabled.
Set the `DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_KUBELET_API_LOGGING_ENABLED` Cluster Agent environment variable to `true`, so newly injected Agent containers will have kubelet logging enabled.
1. Attach an [emptyDir][29] volume to your pod and mount it inside the Agent container. This prevents duplicate logs should the Agent container restart.
926
+
2. Set `DD_LOGS_ENABLED` to `"true"` - this instructs the Agent to collect logs.
927
+
3. Set `DD_LOGS_CONFIG_RUN_PATH` to the emptyDir mount path.
928
+
4. Set `DD_LOGS_CONFIG_K8S_CONTAINER_USE_KUBELET_API` to `"true"` - this instructs the Agent on which logging method to use.
929
+
930
+
```yaml
931
+
apiVersion: apps/v1
932
+
kind: Deployment
933
+
spec:
934
+
#(...)
935
+
template:
936
+
#(...)
937
+
spec:
938
+
# Empty dir to keep track of logging timestamps in case of agent restart
2. You can configure the injected Agents to automatically collect logs for all containers by enabling `CONTAINER_COLLECT_ALL`. Alternatively, logs can be filtered through the standard Kubernetes [Autodiscovery annotations](https://docs.datadoghq.com/containers/kubernetes/log/?tab=helm#autodiscovery-annotations).
0 commit comments