Corn on the cob is exceptional when done in the Instant Pot. It tastes like it was picked a half hour ago. You can shuck the corn before or after cooking.
For husk-on, feel through the stem end for the bottom rows of corn kernels. Cut about ¼ inch off with a sharp knife - about the second or third row of kernels. Leave the rest of the ear intact.
Put 1 1/2 cups of water in the pot. Add 2-6 ears of corn on the trivet, criss-crossing them to allow for steam circulation. Close the pot, set the valve to Sealing and push Pressure Cook (or Manual). Adjust time using the + and - buttons to get to 3 minutes. When it beeps that it's done, flip the valve to Venting for a quick release.
Force the corn out by squeezing the top end of the cob. It will come out easily, leaving the silk in the husk. You’ll have beautifully clean corn. Serve with butter and hot sauce, a dynamite combination.