Type 2 diabetes has both genetic and lifestyle-related risk factors. Having a parent or close family member with diabetes can increase your risk, but it does not mean you will definitely develop the condition. Diet, physical activity, body weight, age, sleep, and other health factors also play a role.