TcpSlaveAgentListener provides a method getAdvertisedPort() to get the advertised port, but does not have a method getAdvertisedHost() to get the host. Instead it has a field CLI_HOST_NAME _which is restricted to _NoExternalUse and therefore cannot be used from other plugins.
For the Kubernetes plugin we need to get this information and TcpSlaveAgentListener.getAdvertisedHost() would be the cleanest way.
_TcpSlaveAgentListener_ provides a method _getAdvertisedPort()_ to get the advertised port, but does not have a method _getAdvertisedHost()_ to get the host. Instead it has a field _CLI_HOST_NAME _which _CLI_HOST_NAME_ which is restricted to _NoExternalUse_ and therefore cannot be used from other plugins.