I'd recommend Lexel caulk. It is super sticky, you can paint over it, it won't crack or pull away from a joint either. You can find it online or buy it in Ace Hardware stores in white or clear.
A long straight joint can also be sealed with EternaBond tape, which lasts "eternally".
- Jack