Clean and slice vegetables. Pack into a sterilized 1 L canning jar, leaving about 2.5 cm of room at the top.
Make the brine. In a medium saucepan, combine the vinegar, water, sugar, and spices. Cook over medium heat, stirring, until the sugar and salt have dissolved. Bring to a boil.
Pour the brine into the jar to completely cover the vegetables. Cool to room temperature and seal with a lid. After it's sealed, tip the jar upside down to evenly distribute the spices.
Refrigerate for at least one day to let the flavours develop. Keeps for up to one month.