You can use spironolactone while breastfeeding. It's been shown that the amount of this drug excreted into breast milk is quite small. This is supported by anecdotal reports 1 from mothers who have breastfed while on spironolactone, with no adverse effects reported in their infants.
However, while the data and experiences seem to suggest that it's generally safe, it's always essential to consider individual circumstances and potential risks. As always, consulting your healthcare provider is key before starting any new medication while breastfeeding. They can provide personalized advice considering your specific situation, the age and health of your infant, and the benefits of the treatment for you.