1. Cook the bacon in a medium skillet until crisp. Drain on paper towels.
2. Cut the kernels off the corncobs with a sharp knife. Combine the corn, peppers, and red onions in a bowl, cover with cold water, and soak for 10 minutes to rinse out some of the starch. Drain.
3. Combine the vinegar, water, sugar, mustard seeds, fennel seeds, and salt in a large saucepan and bring to a boil, stirring to dissolve the sugar and salt. Add the corn, peppers, and onions and bring back to a simmer.
4. Transfer the relish to a glass jar. Add the bacon, whole or crumbled, and cover with a tight-fitting lid. Refrigerate. The relish will be ready to eat in 2 days, and it will keep for up to a week.
Excerpted from Smoke and Pickles by Edward Lee (Artisan Books). Copyright 2013. Photograph by Grant Cornett.