Yes, we can add the nodes by following the below steps:
Step 1: Take a new system; create a new username and password
Step 2: Install SSH and with the master node setup SSH connections
Step 3: Add ssh public_rsa id key to the authorized keys file
Step 4: Add the new DataNode hostname, IP address, and other details in /etc/hosts slaves file:
192.168.1.102 slave3.in slave3
Step 5: Start the DataNode on a new node
Step 6: Login to the new node like suhadoop or:
ssh -X hadoop@192.168.1.103
Step 7: Start HDFS of the newly added slave node by using the following command:
./bin/hadoop-daemon.sh start data node
Step 8: Check the output of the jps command on the new node