To classify ionic and covalent compounds, you should consider the following:
If a compound is made from a metal and a non-metal, its bonding will be ionic.
Also, if a compound is made from two non-metals, its bonding will be covalent.
KCl is an ionic compound since K is a metal and Cl is a non-metal.
CrCl3 is an ionic compound since Cr is a metal and Cl non-metal.
Cl2 is a covalent compound since its between 2 non-metals Cl-Cl.
Cl2O is a covalent compound since its bonds between non-metals.