Insertion and deletion (insdel in short) codes are designed to deal with synchronization errors in communication channels caused by insertions and deletions of message symbols. These codes have received a lot of attention due to their applications in diverse areas such as computational biology, DNA data storage, race-track memory error corrections, language processing, and synchronous digital communication networks. In the present work, we study constructions and limitations of insdel codes from rank metric and subspace codes. This paper studies and improves the idea of the work [4] by Hao Chen on the connection between insdel codes and subspace codes.We discuss why subspace code is a natural choice for constructing insdel codes and show that the interleaved Gabidulin codes can be used to construct nonlinear insdel codes approaching the Singleton bound. Then we show that the indexing scheme of transforming efficient Hamming metric codes to efficient insdel codes can be adapted for the class of rank metric codes. And that improves the base field size of the construction of insdel codes from lifted rank-metric codes. It is also shown that the size of the insdel code from a subspace code can be improved significantly than in the previously proposed construction. We give an algebraic condition for a linear Gabidulin rank metric code to be optimal insdel code adapting the condition proved for Reed-Solomon codes. Moreover, we give constructions of linear and nonlinear insdel codes from Sidon spaces.