In summary, we identified five hub genes (JUN, NFE2L2, ATG5, KRAS, and HSPA5) that are closely associated with ferroptosis in diabetic islets, which are thus potential ferroptosis-related biomarkers for T2D therapy. Here, KRAS is linked to type 2 diabetes mellitus.