Part -1 Datadog using AWS Cluster
This blog will help to set up the cluster required to run and configure Datadog.
First, we will create an ec2 machine that will act as a control node or master node and then a cluster with 2 nodes of ec2 machines will be created.
Let's start our journey with data dog.
step 1:- Launch an instance

I will select Ubuntu as OS

Create a new key pair.
I have created a key pair ppk file named demo_data_dog

The network setting is the default.

I used the free tier so used configured storage 8 Gb
Click on Launch Instance


Connect to the instance created using the private key through Putty.


Open putty enter host name or IP address as highlighted

Give the location of the Private key for authentication.

We will configure the control node cluster and data dog configuration before creating the cluster.
Create and login account
https://app.datadoghq.com/account/login?next=%2F
Datadog has 14 days trial subscription without asking any info.
Once you log in you click on the Integration tab it has multiple options, click on agents and select the OS in my case it is Ubuntu (control plane node).
Click on Select API Key it will show the key available, select the highlighted area as the image it will show the key value which is DD_API_KEY

ubuntu@ip-172-31-39-204:~$ DD_API_KEY=******************* DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 44409 100 44409 0 0 42888 0 0:00:01 0:00:01 --:--:-- 42865
* Datadog Agent 7 install script v1.18.0
* Installing apt-transport-https, curl and gnupg
Enabling service datadog-agent
Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent.service → /lib/systemd/system/datadog-agent.service.
Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent-process.service → /lib/systemd/system/datadog-agent-process.service.
Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent-trace.service → /lib/systemd/system/datadog-agent-trace.service.
Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent-security.service → /lib/systemd/system/datadog-agent-security.service.
No datadog.yaml file detected, not starting the agent
Setting up datadog-signing-keys (1:1.2.0-1) ...
W: --force-yes is deprecated, use one of the options starting with --allow instead.
* Adding your API key to the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
* Setting SITE in the Datadog Agent configuration: /etc/datadog-agent/datadog.yaml
/usr/bin/systemctl
* Starting the Datadog Agent...
Your Datadog Agent is running and functioning properly.
It will continue to run in the background and submit metrics to Datadog.
If you ever want to stop the Datadog Agent, run:
sudo systemctl stop datadog-agent
And to run it again run:
sudo systemctl start datadog-agent
ubuntu@ip-172-31-39-204:~$
Check the status make sure it is running.
ubuntu@ip-172-31-39-204:~$ sudo systemctl status datadog-agent
● datadog-agent.service - Datadog Agent
Loaded: loaded (/lib/systemd/system/datadog-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-07-14 20:43:47 UTC; 2min 14s ago
Main PID: 2494 (agent)
Tasks: 8 (limit: 1141)
Memory: 192.8M
CPU: 2.234s
CGroup: /system.slice/datadog-agent.service
└─2494 /opt/datadog-agent/bin/agent/agent run -p /opt/datadog-agent/run/agent.pid
Configure pre-cluster packages.
### First Kubectl package for cluster
ubuntu@ip-172-31-39-204:~$ sudo snap install kubectl --classic
ubuntu@ip-172-31-39-204:~$ sudo snap install helm --classic
# second aws cli for using aws command line
kubectl 1.27.3 from Canonical✓ installed
ubuntu@ip-172-31-39-204:~$ sudo snap install aws-cli --classic
aws-cli (v2/stable) 2.13.0 from Amazon Web Services (aws✓) installed
# configure aws configure use credentials from your aws account.
ubuntu@ip-172-31-39-204:~$ aws configure
AWS Access Key ID [None]: *******************
AWS Secret Access Key [None]: ****************
Default region name [None]: ap-south-1
Default output format [None]:
In the next post, we will configure the part 2 node cluster for the control node master.
https://mehdipasha.hashnode.dev/part-2-eks-cluster-2-nodes-datadog


