- Mix the corn and onion in a large bowl. Bring the vinegar, water, sugar, and salt to a boil in a medium pot. Stir to dissolve the sugar and salt.
- Place garlic, peppers, chili flakes, and mustard seed in each hot jar. Pack with the corn mixture. Pour boiling brine into the jars, leaving ½ inch headspace and making sure the corn is submerged.
- Check for air bubbles, wipe the rims, and seal. Process for 10 minutes.