Secondary metabolites are bioactive compounds, diverse in structure with versatile ecological functions including key roles in mediating interactions between microorganisms and plants. Importantly, these compounds can promote the colonization of plant surfaces, such as roots, or modulate root exudates to enhance microbial recruitment and establishment. However, owing to the vast diversity of secondary metabolites, their importance in plant root colonization and in particular under stress conditions such as drought, remains unclear. To determine the involvement in root colonization of some of these secondary metabolites, we used amplicon sequencing targeting the adenylation domain of the NRPSs and the 16S rRNA gene from the rhizoplane of wheat grown in soil under normal and drought stress conditions. Results showed that drought transiently affected the bacterial community composition and the NRPS composition in the rhizoplane. We observed that drought selected for distinct groups of siderophores from different taxonomical groups, enriching for Streptomyces and depleting Pseudomonas siderophores. In addition, drought enriched Pseudomonas-derived NRPS genes encoding viscosin, a cyclic lipopeptide with biosurfactant properties, indicating that compounds linked to motility and colonization provide a competitive advantage during rhizoplane colonization under drought stress condition. This observation was experimentally confirmed using the viscosin producing P. fluorescens SBW25 and its viscosin-deficient mutant. A higher abundance of SBW25 colonized the roots under drought stress conditions compared to the viscosin-deficient mutant. In summary, our work demonstrates the potential for amplicon sequencing of NRPS genes coupled with in planta experiments to elucidate the importance of secondary metabolites in root colonization.