Peter points out that the flood was a "type" (prefigure) for baptism in 1 Peter 3:20, 21:
who formerly were disobedient, when once the Divine longsuffering waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight souls, were saved through water. There is also an antitype which now saves us-baptism (not the removal of the filth of the flesh, but the answer of a good conscience toward God), through the resurrection of Jesus Christ, [NKJV]
The passage of the Israelites from Egyptian bondage (compare to "slaves of sin" - Romans 6:6 and 17) through the Red Sea also prefigured baptism.