First and most importantly, the "Control Water" spell does not create more water.
"Until the spell ends, you control any freestanding water inside an area you choose that is a cube up to 100 feet on a side."
The spell then gives you four options that you get to choose on each of your turns as well as the turn that the spell is cast as long as you maintain concentration. Those options are "Flood", "Part Water", "Redirect flow", and "Whirlpool" When read fully, none of these options actually create more water than what was originally there.
I start out with this because your main question "what happens if the container for the water is insufficient to contain the NEW VOLUME?" (all caps the part I am first addressing) implies that you can create more water with the "Control Water" spell, which you can not.
2nd, Now as far as the Flood option, lets dig in. Flood gives you 2 more options based on the area of water you are controlling. You can either cause the existing water to rise 20 feet up (so you could say safely allow your fellow party members to scavenge the bottom of a body of water) or IF you selected a large body of water you can create a 20ft tall wave that then crashes at the destination of your choosing (Fun for naval fights)
Now as you pointed out "If the area includes a shore, the flooding water spills over onto dry land." If you keep reading 2 paragraphs down it then says "The water level remains elevated until the spell ends or you choose a different effect. If this effect produced a wave, the wave repeats on the start of your next turn while the flood effect lasts"
So it is up to your DM to define what shore is in his/her campaign however generally speaking I would say that the only case in which the water would spill over when originating from an artificial container is if you raised water from say a marine tank like the kind in our world designed to hold killer whales, manatees, and other large marine life forms. The reason as to why I say this because due to the limitation of "cube up to 100 feet on a side" you can control up to 7,480,000 gallons of water at a time since there are 7.48 gallons per cubic foot. (equation pulled from https://sciencing.com/calculate-water-fill-rectangular-tank-7686198.html)
When the water is elevated, the container previously holding it becomes empty. If the container still has water in it when you choose this effect the remaining water inside the container would level itself out. So to address your examples, water from a barrel would remain elevated, the river would flood onto the land and soak itself into the ground as water from upriver would then refill the space shortly afterwards, if the edge of an artificial container counts as a shore then when the flood option is chosen the water being controlled will come crashing down onto "shore" and the remaining water in the container will level out, if the edge of an artificial container doesn't count as a shore then the water remains elevated and any remaining water levels out in the container.
I'll gladly clarify anything that doesn't make sense in my answer.