The resemblance between these words helps to highlight that the ark and the rainbow have the same basic function: showing God's dedication to His people.
First, the ark acts as the literal means of deliverance from the flood for Noah and his family specifically:
"But I will establish my covenant with you, and you shall come into the ark, you, your sons, your wife, and your sons' wives with you." (Genesis 6:18)
After the flood, the rainbow represents a broader covenant with God:
"I establish my covenant with you, that never again shall all flesh be cut off by the waters of the flood, and never again shall there be a flood to destroy the earth." And God said, "This is the sign of the covenant that I make between me and you and every living creature that is with you, for all future generations: I have set my bow in the cloud, and it shall be a sign of the covenant between me and the earth." (Genesis 9:11-13)