I was searching for the Kingsguards vow and the only thing I could find was a collection of quotes here: westeros.org. There they get to the point where it is not clear if the vow transfers automatically to the heir if the previous king dies:
"I swore an oath!"
"To Joffrey, not to Tommen."
"Aye..."
taken from the linked site
So we can assume that IF they don't have to serve the new king automatically, they can decide to leave the Kingsguard once the king they vowed to dies. So that could potentially be one point to get rid of the white cloak. I have not read the books yet, but in the tv series:
When Tyrion is in trial for killing Joffrey, Jaime offers his father to leave the Kingsguard so he can take his rightful place as the ruler of Casterly Rock if he spares Tyrions life.
So: are Kingsguards allowed to leave their position at any time or can they only get out by getting dumped? Is this an exception for the Lord Commander? Or (if the assumption mentioned above is right) do they have to wait for their king to die?
I am asking, because there is so much said about the vow of the Night's Watch in the tv series, but they never say anything about the Kingsguards, at least I do not remember.