Set a wire rack over a rimmed baking sheet; place near the stove.
Whisk the yellow cornmeal, all-purpose flour, black pepper, cayenne pepper, and kosher salt in a shallow bowl, reserving 0.25 tsp of the salt to sprinkle after frying.
Toss the okra with the buttermilk in a large bowl until evenly coated.
Lift pieces from the buttermilk, letting excess drip, then dredge in the cornmeal mixture, pressing to adhere; spread on the rack and let rest 5 minutes so the coating sets.
Pour the vegetable oil into a 12-inch cast-iron skillet to about 0.5-inch depth and heat to 350–365°F over medium-high heat.
Fry in batches without crowding, turning once, until deep golden and crisp, 3–5 minutes per batch; maintain 350–365°F between batches.
Return fried pieces to the rack and immediately sprinkle with the reserved salt; repeat with remaining pieces.