The Haftara for Parhshat Haazinu from Shmuel II 22:1-51, also known as Shirat David (David’s Song) is almost identical to Tehilim, Psalm 18.
According to Abravanel, King David wrote the Psalm when he was young and recited it throughout his life whenever he experienced a victory.
The theme of the song is salvation from adversity.
Yalkut Shimoni (Yehoshua 20) lists this song as one of the ten sacred songs of history. The tenth song will be sung when the Mashiach arrives.
In Shmuel II 22:12 we read: “Vayashet choshech svivotav sukkot, chashrat mayim avei shchakim”, “He made darkness into shelters all around Him, the darkness of water, the clouds of heaven.”
According to Rashi “He made darkness into shelters (sukkot)” refers to God’s protection of the Jewish people at the time of the exodus, immediately before the splitting of the sea in Shmot 14:20 “and the cloud of darkness separated between the Egyptians and the Israelites.”
Rashi explains that the darkness emanated from the thick clouds of the sky that would distill water upon the earth as it says in Breisheet Raba 13:10, the clouds distill the rain as a sieve.
Daat Mikra interprets the word “sukkah” as a barrier, screen or cover that protects from above. Here it refers to clouds in the shape of curtains and walls, like screens which hide God’s glory.
As we prepare to gather in our flimsy sukkot, let’s remember that the true protection is from above.
Psalm 18 is traditionally recited for thanksgiving for a miracle.
May we see miracles in the Land of Israel and throughout the world.