from the Spruce Eats
3 cups water
1 cup apple cider vinegar
1/2 cup sugar
1-star anise
12 black peppercorns
1 teaspoon coriander seeds
1 teaspoon fennel seeds
2 sprigs fresh thyme (broken into short pieces)
2 garlic cloves (crushed)
2 cups finely shredded green cabbage (about 1/2 pound)
1 cup matchstick-cut carrots
1 red onion (thinly sliced)
Optional: 1 jalapeño pepper (sliced 1/4-inch thick)
Combine the water, vinegar, sugar, peppercorns, coriander, fennel, bay leaves, thyme, and garlic in a medium saucepan. Bring to boiling over high heat; immediately remove from the heat and set aside to cool at room temperature.
Combine the cabbage, carrots, and onions in a large, heatproof bowl, add the jalapeño if using, and toss the vegetables to mix well.
Pour the pickling liquid through a mesh strainer into another saucepan; discard the spices. Bring the liquid back to boiling and then pour it over the cabbage mixture; stir gently to mix. Cover the bowl and refrigerate until the vegetables are pickled—for at least 24 hours and up to 3 days.