Shuck the corn if using fresh ears.
Cook the corn on the grill or stovetop until slightly charred.
Allow the corn to cool, then cut the kernels off the cob.
In a large bowl, combine mayonnaise and sour cream.
Add the crumbled feta cheese and mix until smooth.
Stir in the lime juice, chili powder, and garlic powder.
Fold in the corn kernels until well coated.
Add the chopped cilantro and diced red onion.
Season with salt and pepper to taste.
Chill in the refrigerator for at least 30 minutes before serving.