In a saucepan, combine vinegar, water, sugar, salt, mustard seeds, peppercorns, dill seeds, and red pepper flakes. Bring to a boil, then simmer for 5 minutes.
Place eggs, garlic, and onion in a jar.
Pour the hot vinegar mixture over the eggs. Seal the jar and refrigerate for at least 24 hours before serving.