Combine the beer and onions in a large pot; bring to a boil. Submerge the bratwurst in the beer; add the red pepper flakes, garlic powder, salt, and pepper. Reduce heat to medium and cook another 10 to 12 minutes. Remove the bratwurst from the beer mixture; reduce heat to low, and continue cooking the onions.