We see at the end of 2 Samuel 20 a table of the king's cabinet. But how different it is to the corresponding table in 2 Samuel 8, when David hadn't sinned, and just after the blessing of God in 2 Samuel 7

There's no statement at the start that David is ruling all Israel with Justice and Righteousness. And now Joab's presence in the table is a sign of weakness, and there's an official in charge of forced labor, which will prove the undoing of the kingdom in generations to come. 

2 Samuel 20: 23 Joab commanded the whole army of Israel;
Benaiah son of Jehoiada was over the Cherethites and Pelethites;
24 Adoram was over forced labor;
Jehoshaphat son of Ahilud was court historian;
25 Sheva was court secretary;
Zadok and Abiathar were priests;
26 and in addition, Ira the Jairite was David’s priest.