Joab was one of the notable generals during David's reign. He was a skillful strategist and schemer. The following passage records his thanks to David after David agreed to restore Absolom from his exile. Ultimately Absolom repaid this favor with rebellion and Joab (and ten of his assistants) ended up killing Absolom.
2 Samuel 14:22 And Joab fell to the ground on his face, and bowed himself, and thanked the king: and Joab said, To day thy servant knoweth that I have found grace in thy sight, my lord, O king, in that the king hath fulfilled the request of his servant.