Answer:
D. It was cloudy this morning but it didn't rain.
Step-by-step explanation:
"But" is a coordinating conjunction, meaning that it connects two independent clauses (complete sentences") to form one, whole sentence. The rule with coordinating conjunctions is that the comma must come after the first clause and before the conjunction, that is why D is correct, but A is not.