Place a trivet into Instant Pot. If you don’t have a trivet you can use a steamer basket that has very short feet on it. You want to raise the corn just enough so that it is not sitting in the water.
Place the corn on the cob onto the trivet. Lay the corn down across the trivet. I was able to fit 5 ears of corn on one layer. If you are cooking a lot of corn on the cob you can stack them on top of each other or place them in the Instant Pot standing straight up.
Close lid. Turn valve to “seal” and cook on high pressure for 2 minutes for shucked corn or 3 minutes for corn with the husks still on them. When timer beeps, quick release pressure. Remove lid and enjoy with butter and salt!