In a large mixing bowl, combine the corn kernels, diced red bell pepper, diced green bell pepper, and chopped red onion.
Make the Pickling Brine:
In a medium saucepan, combine the vinegar, sugar, water, kosher salt, mustard seeds, celery seeds, ground turmeric, black pepper, and red pepper flakes (if using).
Bring the mixture to a boil over medium-high heat, stirring until the sugar and salt are completely dissolved.
Combine and Jar:
Pour the hot pickling brine over the corn and vegetable mixture, ensuring everything is well-coated.
Let the mixture cool to room temperature.
Jar the Corn:
Once the mixture has cooled, pack it tightly into sterilized glass jars, leaving about 1/2 inch of headspace at the top.
Seal the jars with sterilized lids.
Process the Jars:
Place the jars in a large pot of boiling water (the water should cover the jars by at least 1 inch) and process for 10 minutes to ensure a good seal.
Carefully remove the jars from the water and let them cool to room temperature.
Store:
Store the sealed jars in a cool, dark place for at least 1 week before opening to allow the flavors to meld.
Once opened, keep refrigerated and use within 1 month.