I would imagine former classmates, shipmates, etc.
There could also be some hero worship going on: Admirals were once Captain who did great things to get promoted up, current Captain's would know of their exploits and may have followed their careers.
Then of course all the typical meetings and conferences that they would attend and mingle at.
Commander Austin Harris, First Officer, Deep Space Nine (by FltCpt. Bossco)
8.01 - Darkest Before Dawn
(Chapter 8 added, 12/09/2015)