Question: If Joshua the son of Nun married Rahab didn’t he break the covenant of not marrying outside of the their tribes?
Answer: Indeed, our tradition teaches that Rahab married Joshua. The requirement of marrying within the tribe (which only applied to the first generation entering Israel) would not have been a problem. The rationale for this requirement was to prevent the inherited portion of the Land belonging to one tribe passing to another. This would not apply to a convert who was not given a portion of land.
All the Best,
Rabbi Azriel Schrieber