Known?
Leveraged?
Back channel?
Good question.
It's basic etiquette. Not just for the military.
You notify the chain of command you intent to retire.
They arrange a replacement.
The announce the orderly transition of authority.
You are relieved.
You are replaced.
You retire.