On the Carnival Triumph, there was a soda machine just down the hall from us. The cost was $1.50 per can. Also, I often bought a few sodas in port, and never had any trouble bringing them back on board.
We brought two bottles of wine on in our check-in luggage, and the remainder of a bottle of vodka which we poured into a large water bottle. Had no trouble with it at all. The liquour we bought in port (held for safe keeping when reboarding) or in the duty free on board was actually brought to our cabin on Thursday night which is 2 nights before debarkation.
Our bar bill was still $500.00, so they did not lose any money on us.