Place the trivet into the Instant Pot and fill with 4 cups of water. Place a baking pan inside and set the Instant Pot to the saute setting.
While the water is heating whisk together the milk, sugar, heavy cream, eggs and vanilla until incorporated.
Pour into the baking pan and add the cinnamon sticks and star anise.
Cook, stirring constantly for 8 minutes or until the eggnog has thickened.
Notes
If you have a candy thermometer, make sure the eggnog reaches 160 degrees. That way it will be pasteurized and will last longer!
You can serve it warm or cold or even chilled over ice!