The Haftorah for Parashat Chayei Sara comes from the first book of Kings (Kings I 1:1-31), a storyline featuring King David, in his last days, where the future King Shlomo was in line to succeed him. Just as in the Parashah we learn of the death of the great righteous women, Sara, we see the last days of the life of King David, however, the coronation of Shlomo as the next King succeeding his father David was not to be as smooth as once believed many years prior.
The Haftorah and the book of Kings commences relating King David's poor state of health, he was seventy years old and very much suffered from the cold, in fact his situation was so bad that no matter how many clothes he was wearing and blankets were placed over him he would still be feeling very cold (Kings I 1:1).
In fact, according to the Talmud, King David's frigid state was a divine punishment, during a period many years before, when Shaul was the King, when David was running away in fear of his life from Shaul, David actually had an opportunity to protect himself from danger and kill Shaul, however instead, to prove he could have killed him, he cut of a corner of his garment, this garment being the Tzitzit that Shaul was wearing. He cut the garment to show Shaul later on that he could have killed him but he did not out of reverence to the king, despite his life being at risk due to Shaul's paranoia that David was after the throne at that time. Since David disrespected the holy garment of Shaul, in turn, no garments could warm up King David (Berachot 62).
Enter a women of the name, Avishag, she was a young beautiful lady who was brought to the king. David's servants told him, that the only way he would be able to stay warm is, if she were to lie on top of him (Kings I 1:2), despite he was doing this in order to lengthen his life, he could not technically marry her, which would have been ideal, a king is only allowed up to eighteen wives and during that point he was married to eighteen different women. Also for someone of David's righteous stature it would not have been correct for him to divorce one of his wives in order to marry Avishag (Sanhedrin 22a). The Torah does however assure us that Avishag and King David were not intimate (Kings I 1:5).
King David's life did not by any means run smoothly, after he committed an act with Batsheva (Samuel II 11:5), he repented and suffered terrible tragedy, his son Avshalom tried to take away the throne away from him in rebellion, resulting in the loss of his son's life and Amnon, his oldest son also died due to another sin.
David had a wife of the name Haggit, to them they had a son of the name Adoniyahu, he was David's forth oldest son (Samuel II 3:4), Amnon and Avshalom were both older, however they died, and David had another son, older than Adoniyahu who was righteous, his name being Kilav. Adoniyahu was after the Kingship, knowing David was about to die, he felt he was entitled to be the next King, despite knowing that this position had been in place for Shlomo to take, however since Shlomo was born from a questionable relationship between David and Batsheva (Samuel II 12:24), he felt he could exploit that and be able to rule over all of Israel.
Adoniyahu cleverly got the backing of many powerful leaders among the people who would support him in his claim to the throne, including Yoav and the current Kohen Gadol, Abiatar (Kings II 1:7).
He made a lavish feast inviting many prominent people, however he purposely did not invite the people who could potentially oppose him, such as Tzadok, the prophet Natan and the future King, Shlomo!
Natan, being a prophet knew that G-d had chosen Shlomo to be the future King (Chronicles 22:9-10) and he felt he had to let King David know what was going on, despite his very old age, so that a stop could be made to this situation. Just as Natan was about to visit David, Batsheva was also aware what was going on, that her and David's son, Shlomo was going to miss out on the Kingship, so she explained to David what was going on (Kings II 1:17-18), Natan also explained what Adoniyahu was doing (Kings II 1:23-25), to just show how serious the situation was.
After listening to what was going on behind his back, he stated 'As Hashem lives, who has redeemed my life from every trouble, that as i have sworn to you by Hashem, the G-d of Israel, saying, 'Soloman your son will reign after me and he will sit on my throne in my palace,' so shall i fulfill it this very day (Kings II 29-30).' By saying this, David was stating that it would for sure be Shlomo who would be the next King and not Adoniyahu.
Later on in the chapter after the Haftorah finishes, Shlomo was proclaimed the next King (Kings I 1:39), wheeras Adoniyahu fled for his life (Kings I: 1-50), grasping himself on the alter, Shlomo gave Adoniyahu an ultimatum to be loyal or otherwise he would forfeit his life! However, at a later date, Adoniyahu, still hungry for power was masterminding another rebellion, before it could even start, Shlomo had him executed (Kings I 2:23). We in fact learn from the Talmud, Adoniyahu wanted that which was not his, and instead he even lost that which he had (Sotah 9b).