Increased levels of glucose in the blood lead to increased glucose uptake by pancreatic beta cells, glucose metabolism produces more ATP and makes the ATP/ADP ratio go up, this in turn leads to closing of the ATP-sensitive potassium channel and depolarization of the cell, cell depolarization then triggers opening of voltage-gated calcium channels which leads to insulin secretion.