How do I install a ceiling light where one never existed?
You could use a pancake box mounted directly on the joist. (I'd suggest "fan rated" for future options.) This will end up flush with the drywall. Use 2" wood screws; not drywall screws to attach.

Alternately, if you didn't want it right on the joist, and you want to be absolutely sure your fixture isn't going to come crashing down at an awkward moment, get a retrofit ceiling box with a brace. They are really easy to install and might cost you an extra 10 bucks. This will also allow for a fan in the future if you want to go that way. Old work ceiling boxes that are rated for light fixtures do exist, but you're relying on the strength of the drywall and the accuracy of your install to hold them up.