It can be tough to find a pen that will write on a rubber surface. Writing instruments with special inks that stay on rubber surfaces can help. The pen that you choose should be able to write on the type of rubber that you have. You'll need to test a small, hidden area of your rubber to confirm that it won't smear before using your pen in a more visible spot.
A pen or marker with permanent ink may write on your rubber surface without smearing. Sharpie and Marks A Lot brands, among others, feature permanent pens and markers. You can find permanent pens in an array of colours at grocery stores, hardware stores and art supply stores.
Pens and markers with paint instead of standard ink may work on your metal surface. Try a latex paint instead of a water-based one to ensure that it won't smear or wash away if water touches it. You can find latex-paint pens at art supply stores, paint stores and hardware stores.
Some pen manufacturers, such as Nissen, make pens that are designed to write on rubber. They come in various tip sizes and dispense permanent ink. You can also find markers that can write on hot rubber or that come in a bottle instead of a pen barrel. These markers are often in stock at hardware stores and art supply stores.