In a large mixing bowl, combine the sliced cucumbers and onions. Sprinkle with kosher salt, toss to coat, and let sit for 2 hours.
After 2 hours, drain the cucumbers and onions in a colander and rinse under cold water to remove excess salt. Set aside.
In a large pot, combine the sugar, apple cider vinegar, water, mustard seeds, celery seeds, turmeric, black peppercorns, and crushed red pepper flakes (if using). Bring the mixture to a boil over medium heat, stirring until the sugar dissolves.
Once boiling, add the drained cucumbers and onions to the pot. Stir well to combine and return to a boil. Cook for an additional 5 minutes, stirring occasionally.
Remove the pot from heat. Use a ladle to fill sterilized jars with the hot pickles and brine, leaving about 1/2 inch of headspace at the top. Use a wooden spoon to remove any air bubbles.
Wipe the rims of the jars with a clean cloth to ensure a good seal. Place the sterilized lids on the jars and screw on the metal rings until they are fingertip-tight.
Allow the jars to cool to room temperature, then refrigerate for at least 24 hours before enjoying. For longer preservation, consider canning the jars in a water bath.