core/src/main/java/io/fabric8/maven/core/util/kubernetes/ServiceUrlUtil.java
private static String getServiceHostAndPort(String serviceName, String defaultHost, String defaultPort) {
        String serviceEnvVarPrefix = getServiceEnvVarPrefix(serviceName);
        String hostEnvVar = serviceEnvVarPrefix + "_HOST";
        String portEnvVar = serviceEnvVarPrefix + "_PORT";

        String host = getEnvVarOrSystemProperty(hostEnvVar, hostEnvVar, defaultHost);
        String port = getEnvVarOrSystemProperty(portEnvVar, portEnvVar, defaultPort);

        String answer = host + ":" + port;
        return answer;
    }
private static String getServiceHostAndPort(String serviceName, String defaultHost, String defaultPort) {
        String serviceEnvVarPrefix = getServiceEnvVarPrefix(serviceName);
        String hostEnvVar = serviceEnvVarPrefix + "_HOST";
        String portEnvVar = serviceEnvVarPrefix + "_PORT";

        String host = getEnvVarOrSystemProperty(hostEnvVar, hostEnvVar, defaultHost);
        String port = getEnvVarOrSystemProperty(portEnvVar, portEnvVar, defaultPort);

        String answer = host + ":" + port;
        return answer;
    }
Returns the service host and port for the given environment variable name.

@param serviceName the name of the service which is used as a prefix to access the <code>${serviceName}_SERVICE_HOST</code> and <code>${serviceName}_SERVICE_PORT</code> environment variables to find the hos and port
@param defaultHost the default host to use if not injected via an environment variable (e.g. localhost)
@parma defaultPort the default port to use to connect to the service if there is not an environment variable defined