You are allowed to sublet your whole flat if you have occupied your:
Non-subsidised flat (flat purchased from the open market without a CPF housing grant) for at least 3 years if your application for the purchase of the flat was received before 30 Aug 2010;
Non-subsidised flat (flat purchased from the open market without a CPF housing grant) for at least 5 years if your application for the purchase of the flat was received on or after 30 Aug 2010;
Subsidised flat (flat purchased directly from HDB or from the open market with a CPF housing grant) for at least 5 years