Like "Depending on the type of cancer, it could affect the ability of the pancreas to produce insulin (e.g., pancreatic cancer) or the ability of the liver to respond correctly to low and high blood glucose levels (e.g., liver cancer), or something else entirely. Sometimes gall-bladder cancer and/or pancreatic cancer require removal of part or all of the pancreas, leading to surgically-induced diabetes. And then, there's always the potential for the chemical and radioactive agents used in radiation therapy and chemotherapy to either depress pancreatic function, or the body's ability to use insulin/glucose/etc."