Moments before Rhaenyra Targaryen's coronation in the Game of Thrones prequel - House of the Dragon season 1, episode 10 "The Black Queen," Ser Erryk Cargyll, who formally served in King Viserys Targaryen's Kingsguard, arrives at Dragonstone. He bends the knee to her and presents Viserys' gold crown to her. Dressed in Kingsguard armor, he removes his helmet and swears the holy vow in the presence of her uncle, Daemon, and the rest.

This culminates in Rhaenyra's coronation, whereby Daemon places the gold crown atop her head and calls her his Queen. Every man woman and child in the congregation bows down to Queen Rhaenyra, however, the men dressed in white cloak armors (the knights who draw swords to protect her) stand out the most.

Related
Game Of Thrones: House Arryn, Explained

Who poisons Lord Jon Arryn, and what becomes of his wife, son, and House Arryn in HBO's Game of Thrones?

Creation Of The Kingsguard

Ser Erryk Cargyll House of the Dragon.

Created during the reign of Aegon I Targaryen, Game of Thrones lore says the first King of Westeros didn't always feel the need for the Kingsguard. In the wake of the First Dornish War, his sister-wife, Queen Visenya pointed out the dangers of sitting the Iron Throne, and he positively responded to her suggestion. Queen Visenya wielded her longsword, the Targaryen regalia - Dark Sister twice to protect the King from Dornish assassins. One of these attacks took place in 10 AC and acted as a catalyst for the creation of the Kingsguard.

Aegon entrusted his sister-wife to establish what would be known as an elite brotherhood of possibly the finest seven knights in the Seven Kingdoms. Interestingly, Visenya took inspiration from the Night's Watch vows and drew up the Kingsguard vows of a similar nature. Furthermore, she handpicked the seven knights to serve her brother. The Lord Commander of the Kingsguard acts as the head of the Order and is chosen by the king/ queen, typically from among the existing knights in the Kingsguard. The Lord Commander leads the Kingsguard and ensures they perform their duties in letter and spirit.

The Holiest Of Vows

Ser Jaime Lannister and Ser Barristan Selmy in Game of Thrones.

The Kingsguard are interchangeably known as White Cloaks or White Swords. Like the fresh recruits of the Night's Watch, they too make a promise that lasts for a lifetime. Knights in the Kingsguard swear off of lands, wives, and children. The Kingsguard can hold non-hereditary positions such as the Lord Commander of Aegon II's Kingsguard in House of the Dragon - Ser Criston Cole went on to replace Otto Hightower as Hand of the King for a while during the Dance. The sworn brothers swear the holiest of the vows to be accepted to the ranks of the Kingsguard. As narrated by Ser Errick in House of the Dragon:

I swear to ward the Queen with all my strength and give my blood for hers. I shall take no wife, hold no lands, father no children. I shall guard her secrets, obey her commands, ride at her side, and defend her name and honor.

The Lord Commander of the Kingsguard has a place at the Small Council, and when a meeting is in session, a knight of the Kingsguard must guard outside. As for appointments to the Kingsguard, the rite varies from monarch to monarch. Ser Errick, for example, arrived at Dragonstone in House of the Dragon's "The Black Queen" and knelt before everyone and vowed to protect Queen Rhaenyra. The lore says that appointment to the Kingsguard (or Queensguard in the case of Rhaenyra) can be a "solemn" and "formal" event of the knight kneeling before the King/ Queen, swearing their vows, and receiving the white cloak from either the Hand or the Lord Commander.

The Kingsguard In Game Of Thrones

Split image of Jaime Lannister and the Mad King Aerys II and Jaime seated on the Iron Throne in Game of Thrones.

Knights such as Ser Jaime Lannister, and Ser Barristan Selmy took their vows seriously out of the sense of responsibility for the welfare of the Seven Kingdoms rather than chivalry. As for why Ser Jaime Lannister stabbed the Mad King after the Sack of King's Landing, it needed to be done to protect the entire city from annihilation. The fact is the Mad King grew increasingly paranoid with time and planted wildfire caches all over the city of King's Landing. The youngest and the sole member of the Kingsguard that was in King's Landing at the time, Ser Jaime slayed him to thwart his Wildfire plot. He prevented Aerys from giving some pyromancer a command to blast the city and killed the man he was sworn to defend. Jaime's act reeks of the duality of morality - one of the major themes of Game of Thrones lore. Afterward, Ser Barristan and Jaime were Kingsguard to Robert I Baratheon. After Joffrey ascended the Iron Throne, Cersei in Game of Thrones season 1, episode 8 "The Pointy End," dismissed Ser Barristan on account of old age, informing him that Ser Jaime would take his place as Lord Commander of the Kingsguard. The good, honorable Lord Commander Barristan reminded Cersei:

Your Grace, the Kingsguard is a sworn brotherhood. Our vows are taken for life. Only death relieves us of our sacred trust.

Ser Barristan raised hell with the council, and he refused the retirement benefits that the Council promised him and took off his armor. Before he walked off, he dropped his sword and asked Joffrey to melt it down and add it to the others. After this public dismissal, Ser Barristan sailed to Essos and true to his word, died a knight in service of Daenerys Targaryen in Game of Thrones.

MORE: Game Of Thrones: House Frey, Explained