- Install helm (mac)
- https://github.com/helm/helm/releases download desired version
brew install helm
- Unzip tar.gz by double click
- Open the terminal to authorize the downloaded file
- move this file to /usr/local/bin
mv helm /usr/local/bin/helm
- Check if desired helm version was installed (mine was 3.8.2)
- The reason I installed 3.8.2 is that the new version 3.10 didn’t match my k8s version.
helm version
- Add Datadog repo
helm repo add datadog https://helm.datadoghq.com
- Update
- If updated successfully, the console prints Update Complete. ⎈Happy Helming!⎈
helm repo update
- Add a default YAML file (example below)
YAML
# Datadog Agent with Logs, APM, Processes, and System Probe enabled targetSystem: "linux" datadog: apiKey: <YOUR_API_KEY> # appKey: <DATADOG_APP_KEY> # If not using secrets, then use apiKey and appKey instead #apiKeyExistingSecret: <DATADOG_API_KEY_SECRET> #appKeyExistingSecret: <DATADOG_APP_KEY_SECRET> # clusterName: <CLUSTER_NAME> clusterName: <YOUR_CLUSTER_NAME> tags: [] # datadog.kubelet.tlsVerify should be `false` on kind and minikube # to establish communication with the kubelet # kubelet: # tlsVerify: "false" logs: enabled: true containerCollectAll: false containerCollectUsingFiles: true apm: portEnabled: true socketPath: /var/run/datadog/apm.socket hostSocketPath: /var/run/datadog/ processAgent: enabled: true processCollection: false systemProbe: enableTCPQueueLength: false enableOOMKill: true collectDNSStats: false
- Apply to k8s (suppose yaml filename is datadog-values.yaml)
helm install datadog-agent -f datadog-values.yaml --set datadog.site='datadoghq.com' datadog/datadog
- If you changed some settings, upgrade helm.
- This command gives these errors
- To fix this, add clusterAgent settings inside the YAML file.
- When successfully installed, it prints that it is listening on port 8126 for APM service.
helm upgrade -f datadog-values.yaml datadog-agent datadog/datadog
* set `clusterAgent.replicas` value to `2` replicas . * set `clusterAgent.createPodDisruptionBudget` to `true`.
YAML
targetSystem: "linux" datadog: apiKey: <YOUR_API_KEY> # appKey: <DATADOG_APP_KEY> # If not using secrets, then use apiKey and appKey instead #apiKeyExistingSecret: <DATADOG_API_KEY_SECRET> #appKeyExistingSecret: <DATADOG_APP_KEY_SECRET> # clusterName: <CLUSTER_NAME> clusterName: <YOUR_CLUSTER_NAME> tags: [] # datadog.kubelet.tlsVerify should be `false` on kind and minikube # to establish communication with the kubelet # kubelet: # tlsVerify: "false" logs: enabled: true containerCollectAll: false containerCollectUsingFiles: true apm: portEnabled: true socketPath: /var/run/datadog/apm.socket hostSocketPath: /var/run/datadog/ processAgent: enabled: true processCollection: false systemProbe: enableTCPQueueLength: false enableOOMKill: true collectDNSStats: false clusterAgent: replicas: 2 createPodDisruptionBudget: true
- Check the Datadog agent running in k8
- Helm → Releases
- Finally, Check in the Datadog dashboard
- Kubernetes - Overview (recommended dashboard for k8s)
Logs
Simply change logs.containerCollectAll settings to true.
YAML
targetSystem: "linux" datadog: apiKey: <YOUR_API_KEY> # appKey: <DATADOG_APP_KEY> # If not using secrets, then use apiKey and appKey instead #apiKeyExistingSecret: <DATADOG_API_KEY_SECRET> #appKeyExistingSecret: <DATADOG_APP_KEY_SECRET> # clusterName: <CLUSTER_NAME> clusterName: <YOUR_CLUSTER_NAME> tags: [] # datadog.kubelet.tlsVerify should be `false` on kind and minikube # to establish communication with the kubelet # kubelet: # tlsVerify: "false" logs: enabled: true containerCollectAll: true containerCollectUsingFiles: true apm: portEnabled: true socketPath: /var/run/datadog/apm.socket hostSocketPath: /var/run/datadog/ processAgent: enabled: true processCollection: false systemProbe: enableTCPQueueLength: false enableOOMKill: true collectDNSStats: false clusterAgent: replicas: 2 createPodDisruptionBudget: true
After logging enabled, you can view logs by k8s services!
Default Kubernetes dashboards
Kubernetes - Overview
Kubernetes Pods Overview
Kubernetes Deployments Overview
This dashboard provides you with the most CPU-intensive, memory-intensive, disk-intensive, and network-intensive deployments. My conclusion with these results is DON’T USE PYTHON.