I had contemplated using some kind of door switch, but instead opted for mounted the switch on the door frame, inside the cabinet. This way they are only on when needed, and mostly because any switch I came up with had to be mounted in the opening, and would get in the way. We really don't mind switching it on as needed. Maybe there is some kind of motion sensor you could use that mounts inside?
For lighting I used strip LED lighting, which works great. It adheres to the cabinet framing member above the door, completely out of the way. As mentioned before, I gained a lot of brownie points from the wife installing them in all the cabinets.