A Queensland police sergeant has resigned after he was caught with methamphetamine, steroids and sleeping pills.

Kester Clyde Elliott, 36, pleaded guilty in the Brisbane Magistrates Court on Wednesday to possessing dangerous and restricted drugs and a glass pipe.

The former operation support command officer was nabbed by detectives from the Crime and Corruption Commission on February 4.

The court heard detectives, acting on a tip-off, followed Elliott to a drug deal in Fortitude Valley on the night of February 4.

Police prosecutor Sergeant Scott Pearson said they found a small amount of methamphetamine (ice) in clip-seal bags hidden in fake batteries in his car and at his Teneriffe home.