Unscrew the rollers holding the rack in place in the sides of the dishwasher with a Phillips screwdriver. Pull the metal rack out of the dishwasher once the rollers are off, and replace it with a plastic one if you are able to so you avoid rust problems without the need for maintenance. Screw the rollers back in place once the new rack is in position.
Empty the dishwasher as soon as the machine finishes cleaning the dishes. This helps prevent water from accumulating in the machine for an extended period of time, which causes rusting.
Wipe down any metal racks in the dishwasher with a dry rag as soon as you empty the machine to remove any remaining moisture. Keeping the racks dry prevents them from rusting.
Inspect the racks regularly. Remove the beginnings of any rust with a fine sandpaper to prevent it from spreading.
Paint over any areas previously affected by rust with an acrylic paint using a small paintbrush. The acrylic paint forms a hardened exterior over the rusted area that helps prevent further moisture exposure. Wait several hours for the paint to dry before attempting to use the dishwasher again.