David hasn't been doling out his political patronage very judiciously, favouring the Judahites, and the other tribes are itching for their fair share. Sheba, a Benjaminite, raises an army, which camps out together, possibly in his garden.
David meanwhile, deals with the 10 concubines Absalom slept with in chapter 16. He locks them up in a house, where they will have food, but will live as widows (ie no more sex). That taken care of, he orders his servant Amasa to gather the men of Judah there within three days.
Amasa takes his sweet time, so David tasks another servant, Abishai, with the task. Then he orders them to go after Sheba. Joab and Amasa go off together. As they're riding along, Joab's sword 'falls out' of its holster. He picks it up, then holds Amasa by the beard as if to kiss him then stabs him viciously in the fifth rib (v. 10). Then Joab and Abishai continue along together.
The people are not impressed by this little act of barbarianism, and after they pull Amasa off the highway and bury him, go off to join Sheba.
Joab's men catch up to Sheba in the town of Abel, which is walled. An Abelite woman asks to speak to Joab. She asks him why he's besieging her city. He says he isn't, he's just trying to get Sheba. She promises to throw Sheba's head over the wall. She goes back into the city and soon the head comes sailing over the wall. True to his word, Joab leaves.
The chapter leaves with a listing of David's chief bureaucrats.