A Sterling man has pleaded guilty to a drug charge as part of a plea deal - an agreement that came one day before he was slated to go to trial on drug and weapon offenses that accused him of carrying a knife while possessing meth and cocaine last summer.