In a heavy bottomed medium size saucepan heat 2 Tbsp vegetable oil. Add onion and peppers. Cook over medium-high heat for 5 minutes until they begin to soften and turn translucent.
To the saucepan add grated apple, red pepper flakes, salt, black pepper, celery seed, vinegar, mustard and sugar. Stir until dissolved.
Tie the pickling spice in cheesecloth or place into a tea diffuser. Center in the saucepan. Simmer uncovered over low heat for 45 minutes, stirring occasionally to prevent sticking.
After 45 minutes, remove pickling spice and add 2 tablespoons instant pectin. Bring to a boil. Boil for 2 minutes, then remove from the heat. Let cool completely.
Store chilled in the refrigerator, in an airtight container for up to 1 week.
Notes
Can this onion relish be canned using proper canning technique? This recipe uses instant pectin. You may be able to can this onion relish recipe however, you would need to use classic Ball's RealFruit pectin or universal pectin so it won't break down during the hot water bath when processing the jars. Start with one 1.75 ounce box (4 tablespoons) and adjust the thickness after boiling the onion relish adding more if needed, before ladling into the jars to can.
Prepare boiling water canner. Heat jars and lids in simmering water until ready for use. Do not boil. Set bands aside.
Cook onion relish per the recipe using Ball's classic RealFruit Pectin or similar in place of instant pectin. (OR Universal pectin)
Ladle hot relish into hot jars leaving 1/2 inch headspace. Remove air bubbles, wipe rim with a damp paper towel or clean lint free kitchen towel. Center hot lid on jar. Apply band and adjust just until it's fingertip tight.
Place jar in boiling water canner. Repeat process until all jars are filled.
Process jars for 15 minutes. Turn off heat; remove lid of canner and let jars stand for 5 minutes. (Please note, canning at high altitude may need longer processing time.)
Carefully remove jars using tongs (they're hot!) and set aside to cool. Check the lids for seal after 24 hours. Gently tap, the lid should not flex up and down when the center is pressed.