Wash the okra and trim the stems to 1/2 inch. Place 1 chile, 1/2 teaspoon mustard seed, 1/4 teaspoon peppercorns, and 2 cloves of garlic in the bottom of each of 4 sterilized pint-sized canning jars. Divide the okra evenly among the jars, placing the pods vertically, alternating stems up and down.
In a medium saucepan over medium heat, bring the vinegar, water, and salt to a boil. Carefully pour the boiling mixture over the okra in the jars, leaving 1/4 inch of headroom between the top of the liquid and the lid. Seal the lids.
Process the jars in a boiling-water canner for 15 minutes. Store the unopened jars at room temperature for up to 1 year. Once the jars are opened, store in the refrigerator for up to 1 month.
Variation: For refrigerator pickles, skip the boiling-water canner and refrigerate for up to 1 month.