Blanch the sliced onions and diced carrots in a small saucepan of boiling water for one minute.
Strain the vegetables into a colander and then return them back to the pan.
Add the white vinegar, sugar, crushed red chili flakes, pepper and salt. Then add just enough water to cover the vegetables. Bring the mixture to a boil and cook it for one minute.
Pour the pickled relish (with the liquid) into jars and let it cool completely before sealing the jars.
The relish will keep for up to two weeks in the fridge.