I grow loads in post and have done for decades.
Tomatoes, french climbing/dwarf beans and spare gherkins and peas all do well for me.
Of course, larger pots and bags for early and maincrop potatoes.
Have seen others grow sweetcorn successfully, just do a search in youtube.
Of course, for pollination it will be important to have a number of pots together, as you'd be having one plant per pot.
To help with drainage, to get nutrients and allow them not to dry out, allow the pots to sit on a soil bed, even at the edges. So as well as watering the pot, water around them too.
Rather than a pot, a used compost bag cut in half or rolled down works very well, with some added drainage holes.