node/src/main/java/io/fabric8/jube/apimaster/ApiMasterService.java
protected void ensureModelHasKubernetesServices(String hostName, String port) {
        ImmutableMap<String, Service> serviceMap = model.getServiceMap();
        Service service = null;
        try {
            service = serviceMap.get(ServiceIDs.KUBERNETES_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.KUBERNETES_SERVICE_ID);
                service.setSelector(createKubernetesServiceLabels());
                createService(service);
            }
            service = serviceMap.get(ServiceIDs.KUBERNETES_RO_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.KUBERNETES_RO_SERVICE_ID);
                service.setSelector(createKubernetesServiceLabels());
                createService(service);
            }
            service = serviceMap.get(ServiceIDs.FABRIC8_CONSOLE_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.FABRIC8_CONSOLE_SERVICE_ID);
                service.setSelector(createFabric8ConsoleServiceLabels());
                createService(service);
            }
        } catch (Exception e) {
            LOG.error("Failed to create service " + service + ". " + e, e);
        }
    }
/**
     * Lets ensure that the "kubernetes" and "kubernetes-ro" services are defined so that folks can access the core
     * REST API via kubernetes services
     */
Lets ensure that the "kubernetes" and "kubernetes-ro" services are defined so that folks can access the core
REST API via kubernetes services
Lets ensure that the " kubernetes " and " kubernetes - ro " services are defined so that folks can access the core REST API via kubernetes services
protected void ensureModelHasKubernetesServices(String hostName, String port) {
        ImmutableMap<String, Service> serviceMap = model.getServiceMap();
        Service service = null;
        try {
            service = serviceMap.get(ServiceIDs.KUBERNETES_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.KUBERNETES_SERVICE_ID);
                service.setSelector(createKubernetesServiceLabels());
                createService(service);
            }
            service = serviceMap.get(ServiceIDs.KUBERNETES_RO_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.KUBERNETES_RO_SERVICE_ID);
                service.setSelector(createKubernetesServiceLabels());
                createService(service);
            }
            service = serviceMap.get(ServiceIDs.FABRIC8_CONSOLE_SERVICE_ID);
            if (service == null) {
                service = createService(hostName, port);
                service.setId(ServiceIDs.FABRIC8_CONSOLE_SERVICE_ID);
                service.setSelector(createFabric8ConsoleServiceLabels());
                createService(service);
            }
        } catch (Exception e) {
            LOG.error("Failed to create service " + service + ". " + e, e);
        }
    }
protected void ensureModelHasKubernetesServices ( String hostName , String port ) { ImmutableMap < String , Service > serviceMap = model . getServiceMap ( ) ; Service service = null ; try { service = serviceMap . get ( ServiceIDs . KUBERNETES_SERVICE_ID ) ; if ( service == null ) { service = createService ( hostName , port ) ; service . setId ( ServiceIDs . KUBERNETES_SERVICE_ID ) ; service . setSelector ( createKubernetesServiceLabels ( ) ) ; createService ( service ) ; } service = serviceMap . get ( ServiceIDs . KUBERNETES_RO_SERVICE_ID ) ; if ( service == null ) { service = createService ( hostName , port ) ; service . setId ( ServiceIDs . KUBERNETES_RO_SERVICE_ID ) ; service . setSelector ( createKubernetesServiceLabels ( ) ) ; createService ( service ) ; } service = serviceMap . get ( ServiceIDs . FABRIC8_CONSOLE_SERVICE_ID ) ; if ( service == null ) { service = createService ( hostName , port ) ; service . setId ( ServiceIDs . FABRIC8_CONSOLE_SERVICE_ID ) ; service . setSelector ( createFabric8ConsoleServiceLabels ( ) ) ; createService ( service ) ; } } catch ( Exception e ) { LOG . error ( "Failed to create service " + service + ". " + e , e ) ; } }
Lets ensure that the "kubernetes" and "kubernetes-ro" services are defined so that folks can access the core
 REST API via kubernetes services
Lets ensure that the " kubernetes " and " kubernetes - ro " services are defined so that folks can access the core REST API via kubernetes services