I use a superfine Staedtler Lumocolour (black) pen. They write on pretty much anything and are permanent and a very fine line. They are also available in other colours but I just use black.
These days I use a laser engraver to write on the bottom of most things I make. Since getting the laser, I just use the pen for the odd piece I don't do with the laser.