Since the story is set 200 years after this according to the novel making us feeling blue balled, I will put some detail on the betrayal background.
Lambert is a peasant becoming generals. He rose into general position because of the support from his friend who betray him and the king at the time. Those three are comrade.
The king have a secret though, he is the daughter of the last king impersonating as a man. Lambert and his friend knew about it ofc, but Lambert just don't care about that fact. Some nobles while doesn't know for sure, suspecting the king is actually a woman. So, behind the scenes they groomed Lambert to become a rebel leader without his knowing.
While the king knew its not true, the rumour already spread and she did what she gotta do as king. Dick move, but necessary.