How to attach a potentiometer to a servo motor shaft

Must be dc. 12v

That covers everything from 1 cm to who knows how large.
Can you narrow it down by adding the current rating ? (or motor size in mm ?)

What about this ? (you also haven't mentioned speed criteria (degrees per second etc)