Tubercles are skin nodules made of keratin, the same materials as hair, hooves, and fingernails.  They are present in species representing at least 15 families of fish, including even pet goldfish.  In many species, tubercles are found only in males during the breeding season and are shed shortly thereafter.  They are often called breeding tubercles for that reason. 

Breeding tubercles (photo credit: G. Engman and P. Cooney).

 The main functions of tubercles include species recognition, fighting and defense of spawning territory or nests, and stimulation of breeding females. (fishionary.fisheries.org/tubercles)

For more information, please see “Breeding tubercles and contact organs in fishes: their occurrence, structure, and significance” (Wiley and Collette 1970) and the related Fisheries Blog post: “Top 10 Weirdest Things Found on a Fish’s Head.”