diff --git a/apps/k8s-node/BUILD b/apps/k8s-node/BUILD
index b17a604..c28c480 100644
--- a/apps/k8s-node/BUILD
+++ b/apps/k8s-node/BUILD
@@ -1,6 +1,13 @@
-BUNDLES = [
+BUNDLES = JACKSON + [
     "//apps/k8s-node/api:onos-apps-k8s-node-api",
     "//apps/k8s-node/app:onos-apps-k8s-node-app",
+    "@k8s_client//jar",
+    "@k8s_model//jar",
+    "@okhttp//jar",
+    "@okio//jar",
+    "@logging_interceptor//jar",
+    "@jackson_dataformat_yaml//jar",
+    "@snakeyaml//jar",
 ]
 
 onos_app(
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sApiConfig.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sApiConfig.java
index 157763f..48f6b13 100644
--- a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sApiConfig.java
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sApiConfig.java
@@ -33,17 +33,19 @@
     private final Scheme scheme;
     private final IpAddress ipAddress;
     private final int port;
+    private final State state;
     private final String token;
     private final String caCertData;
     private final String clientCertData;
     private final String clientKeyData;
 
     private DefaultK8sApiConfig(Scheme scheme, IpAddress ipAddress, int port,
-                                String token, String caCertData,
+                                State state, String token, String caCertData,
                                 String clientCertData, String clientKeyData) {
         this.scheme = scheme;
         this.ipAddress = ipAddress;
         this.port = port;
+        this.state = state;
         this.token = token;
         this.caCertData = caCertData;
         this.clientCertData = clientCertData;
@@ -66,6 +68,25 @@
     }
 
     @Override
+    public State state() {
+        return state;
+    }
+
+    @Override
+    public K8sApiConfig updateState(State newState) {
+        return new Builder()
+                .scheme(scheme)
+                .ipAddress(ipAddress)
+                .port(port)
+                .state(newState)
+                .token(token)
+                .caCertData(caCertData)
+                .clientCertData(clientCertData)
+                .clientKeyData(clientKeyData)
+                .build();
+    }
+
+    @Override
     public String token() {
         return token;
     }
@@ -97,6 +118,7 @@
         return port == that.port &&
                 scheme == that.scheme &&
                 ipAddress.equals(that.ipAddress) &&
+                state == that.state &&
                 token.equals(that.token) &&
                 caCertData.equals(that.caCertData) &&
                 clientCertData.equals(that.clientCertData) &&
@@ -105,7 +127,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(scheme, ipAddress, port, token, caCertData,
+        return Objects.hash(scheme, ipAddress, port, state, token, caCertData,
                 clientCertData, clientKeyData);
     }
 
@@ -115,6 +137,7 @@
                 .add("scheme", scheme)
                 .add("ipAddress", ipAddress)
                 .add("port", port)
+                .add("state", state)
                 .add("token", token)
                 .add("caCertData", caCertData)
                 .add("clientCertData", clientCertData)
@@ -136,6 +159,7 @@
         private Scheme scheme;
         private IpAddress ipAddress;
         private int port;
+        private State state;
         private String token;
         private String caCertData;
         private String clientCertData;
@@ -145,6 +169,7 @@
         public K8sApiConfig build() {
             checkArgument(scheme != null, NOT_NULL_MSG, "scheme");
             checkArgument(ipAddress != null, NOT_NULL_MSG, "ipAddress");
+            checkArgument(state != null, NOT_NULL_MSG, "state");
 
             if (scheme == HTTPS) {
                 checkArgument(token != null, NOT_NULL_MSG, "token");
@@ -153,7 +178,7 @@
                 checkArgument(clientKeyData != null, NOT_NULL_MSG, "clientKeyData");
             }
 
-            return new DefaultK8sApiConfig(scheme, ipAddress, port, token,
+            return new DefaultK8sApiConfig(scheme, ipAddress, port, state, token,
                     caCertData, clientCertData, clientKeyData);
         }
 
@@ -176,6 +201,12 @@
         }
 
         @Override
+        public Builder state(State state) {
+            this.state = state;
+            return this;
+        }
+
+        @Override
         public Builder token(String token) {
             this.token = token;
             return this;
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sNode.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sNode.java
index 76b845c..3e26a50 100644
--- a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sNode.java
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/DefaultK8sNode.java
@@ -90,6 +90,18 @@
     }
 
     @Override
+    public K8sNode updateIntgBridge(DeviceId deviceId) {
+        return new Builder()
+                .hostname(hostname)
+                .type(type)
+                .intgBridge(deviceId)
+                .managementIp(managementIp)
+                .dataIp(dataIp)
+                .state(state)
+                .build();
+    }
+
+    @Override
     public IpAddress managementIp() {
         return managementIp;
     }
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sApiConfig.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sApiConfig.java
index 0c63733..62d050d 100644
--- a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sApiConfig.java
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sApiConfig.java
@@ -38,6 +38,21 @@
     }
 
     /**
+     * Lists of API server connectivity states.
+     */
+    enum State {
+        /**
+         * Signifies that client is connected to k8s API server.
+         */
+        CONNECTED,
+
+        /**
+         * Signifies that client is dis-connected from k8s API server.
+         */
+        DISCONNECTED,
+    }
+
+    /**
      * Returns the authentication scheme.
      *
      * @return authentication scheme
@@ -59,6 +74,21 @@
     int port();
 
     /**
+     * Returns the connectivity state to kubernetes API server.
+     *
+     * @return connectivity state to kubernetes API server
+     */
+    State state();
+
+    /**
+     * Returns new kubernetes API config instance with given state.
+     *
+     * @param newState updated state
+     * @return updated kubernetes API config
+     */
+    K8sApiConfig updateState(State newState);
+
+    /**
      * Returns the token used for authenticating to API server.
      *
      * @return token value
@@ -123,6 +153,14 @@
         Builder port(int port);
 
         /**
+         * Returns kubernetes API server config builder with supplied state.
+         *
+         * @param state connectivity state
+         * @return kubernetes API config builder
+         */
+        Builder state(State state);
+
+        /**
          * Returns kubernetes API server config builder with supplied token.
          *
          * @param token token for authentication
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java
index 4abc2cb..671b37a 100644
--- a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java
@@ -68,6 +68,14 @@
     DeviceId intgBridge();
 
     /**
+     * Returns new kubernetes node instance with given integration bridge.
+     *
+     * @param deviceId  integration bridge device ID
+     * @return updated kubernetes node
+     */
+    K8sNode updateIntgBridge(DeviceId deviceId);
+
+    /**
      * Returns the management network IP address of the node.
      *
      * @return ip address
diff --git a/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sApiConfigTest.java b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sApiConfigTest.java
index 55e56f1..4abac0f 100644
--- a/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sApiConfigTest.java
+++ b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sApiConfigTest.java
@@ -25,6 +25,8 @@
 import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
 import static org.onosproject.k8snode.api.K8sApiConfig.Scheme.HTTP;
 import static org.onosproject.k8snode.api.K8sApiConfig.Scheme.HTTPS;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.CONNECTED;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.DISCONNECTED;
 
 /**
  * Unit tests for DefaultK8sApiConfig.
@@ -73,6 +75,7 @@
                 .scheme(SCHEME_1)
                 .ipAddress(IP_ADDRESS_1)
                 .port(PORT_1)
+                .state(CONNECTED)
                 .token(TOKEN_1)
                 .caCertData(CA_CERT_DATA_1)
                 .clientCertData(CLIENT_CERT_DATA_1)
@@ -83,6 +86,7 @@
                 .scheme(SCHEME_1)
                 .ipAddress(IP_ADDRESS_1)
                 .port(PORT_1)
+                .state(CONNECTED)
                 .token(TOKEN_1)
                 .caCertData(CA_CERT_DATA_1)
                 .clientCertData(CLIENT_CERT_DATA_1)
@@ -93,6 +97,7 @@
                 .scheme(SCHEME_2)
                 .ipAddress(IP_ADDRESS_2)
                 .port(PORT_2)
+                .state(DISCONNECTED)
                 .token(TOKEN_2)
                 .caCertData(CA_CERT_DATA_2)
                 .clientCertData(CLIENT_CERT_DATA_2)
@@ -120,6 +125,7 @@
         assertEquals(SCHEME_1, config.scheme());
         assertEquals(IP_ADDRESS_1, config.ipAddress());
         assertEquals(PORT_1, config.port());
+        assertEquals(CONNECTED, config.state());
         assertEquals(TOKEN_1, config.token());
         assertEquals(CA_CERT_DATA_1, config.caCertData());
         assertEquals(CLIENT_CERT_DATA_1, config.clientCertData());
diff --git a/apps/k8s-node/app/BUILD b/apps/k8s-node/app/BUILD
index d740f68..ca5b850 100644
--- a/apps/k8s-node/app/BUILD
+++ b/apps/k8s-node/app/BUILD
@@ -3,6 +3,13 @@
     "//protocols/ovsdb/api:onos-protocols-ovsdb-api",
     "//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc",
     "//apps/k8s-node/api:onos-apps-k8s-node-api",
+    "@k8s_client//jar",
+    "@k8s_model//jar",
+    "@okhttp//jar",
+    "@okio//jar",
+    "@logging_interceptor//jar",
+    "@jackson_dataformat_yaml//jar",
+    "@snakeyaml//jar",
 ]
 
 TEST_DEPS = TEST_ADAPTERS + TEST_REST + [
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/K8sApiConfigListCommand.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/K8sApiConfigListCommand.java
index 6ede6da..b0b4bc2 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/K8sApiConfigListCommand.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/K8sApiConfigListCommand.java
@@ -37,7 +37,7 @@
         description = "Lists all kubernetes API server configs registered to the service")
 public class K8sApiConfigListCommand extends AbstractShellCommand {
 
-    private static final String FORMAT = "%-10s%-25s%-10s";
+    private static final String FORMAT = "%-10s%-25s%-10s%-10s";
 
     @Override
     protected void doExecute() {
@@ -48,10 +48,10 @@
         if (outputJson()) {
             print("%s", json(configs));
         } else {
-            print(FORMAT, "Scheme", "IpAddress", "Port");
+            print(FORMAT, "Scheme", "IpAddress", "Port", "State");
             for (K8sApiConfig config : configs) {
-                print(FORMAT, config.scheme().name(),
-                        config.ipAddress().toString(), config.port());
+                print(FORMAT, config.scheme().name(), config.ipAddress().toString(),
+                        config.port(), config.state().name());
             }
             print("Total %s API configs", configService.apiConfigs().size());
         }
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/K8sApiConfigCodec.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/K8sApiConfigCodec.java
index 5e0cb27..a65f47d 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/K8sApiConfigCodec.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/K8sApiConfigCodec.java
@@ -26,6 +26,7 @@
 
 import static org.onlab.util.Tools.nullIsIllegal;
 import static org.onosproject.k8snode.api.K8sApiConfig.Scheme.HTTPS;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.DISCONNECTED;
 
 /**
  * Kubernetes API server config codec used for serializing and de-serializing JSON string.
@@ -35,6 +36,7 @@
     private static final String SCHEME = "scheme";
     private static final String IP_ADDRESS = "ipAddress";
     private static final String PORT = "port";
+    private static final String STATE = "state";
     private static final String TOKEN = "token";
     private static final String CA_CERT_DATA = "caCertData";
     private static final String CLIENT_CERT_DATA = "clientCertData";
@@ -47,7 +49,8 @@
         ObjectNode node = context.mapper().createObjectNode()
                 .put(SCHEME, entity.scheme().name())
                 .put(IP_ADDRESS, entity.ipAddress().toString())
-                .put(PORT, entity.port());
+                .put(PORT, entity.port())
+                .put(STATE, entity.state().name());
 
         if (entity.scheme() == HTTPS) {
             node.put(TOKEN, entity.token())
@@ -90,7 +93,8 @@
         K8sApiConfig.Builder builder = DefaultK8sApiConfig.builder()
                 .scheme(scheme)
                 .ipAddress(ipAddress)
-                .port(port);
+                .port(port)
+                .state(DISCONNECTED);
 
         JsonNode tokenJson = json.get(TOKEN);
         JsonNode caCertDataJson = json.get(CA_CERT_DATA);
@@ -112,7 +116,6 @@
             clientKeyData = nullIsIllegal(clientKeyDataJson.asText(),
                     CLIENT_KEY_DATA + MISSING_MESSAGE);
 
-
         } else {
             if (tokenJson != null) {
                 token = tokenJson.asText();
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DefaultK8sApiConfigHandler.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DefaultK8sApiConfigHandler.java
new file mode 100644
index 0000000..7415395
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DefaultK8sApiConfigHandler.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.k8snode.impl;
+
+import io.fabric8.kubernetes.api.model.Node;
+import io.fabric8.kubernetes.api.model.NodeAddress;
+import io.fabric8.kubernetes.client.KubernetesClient;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cluster.ClusterService;
+import org.onosproject.cluster.LeadershipService;
+import org.onosproject.cluster.NodeId;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.k8snode.api.DefaultK8sNode;
+import org.onosproject.k8snode.api.K8sApiConfig;
+import org.onosproject.k8snode.api.K8sApiConfigAdminService;
+import org.onosproject.k8snode.api.K8sApiConfigEvent;
+import org.onosproject.k8snode.api.K8sApiConfigListener;
+import org.onosproject.k8snode.api.K8sNode;
+import org.onosproject.k8snode.api.K8sNodeAdminService;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.slf4j.Logger;
+
+import java.util.Objects;
+import java.util.concurrent.ExecutorService;
+
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
+import static org.onlab.util.Tools.groupedThreads;
+import static org.onosproject.k8snode.api.K8sNode.Type.MASTER;
+import static org.onosproject.k8snode.api.K8sNode.Type.MINION;
+import static org.onosproject.k8snode.api.K8sNodeService.APP_ID;
+import static org.onosproject.k8snode.api.K8sNodeState.INIT;
+import static org.onosproject.k8snode.util.K8sNodeUtil.k8sClient;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Handles the state of kubernetes API server configuration.
+ */
+@Component(immediate = true)
+public class DefaultK8sApiConfigHandler {
+
+    private final Logger log = getLogger(getClass());
+
+    private static final String INTERNAL_IP = "InternalIP";
+    private static final String K8S_ROLE = "node-role.kubernetes.io";
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected LeadershipService leadershipService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected ClusterService clusterService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected K8sApiConfigAdminService k8sApiConfigAdminService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected K8sNodeAdminService k8sNodeAdminService;
+
+    private final ExecutorService eventExecutor = newSingleThreadExecutor(
+            groupedThreads(this.getClass().getSimpleName(), "event-handler", log));
+
+    private final K8sApiConfigListener k8sApiConfigListener = new InternalK8sApiConfigListener();
+
+    private ApplicationId appId;
+    private NodeId localNode;
+
+    @Activate
+    protected void activate() {
+        appId = coreService.getAppId(APP_ID);
+        localNode = clusterService.getLocalNode().id();
+        leadershipService.runForLeadership(appId.name());
+        k8sApiConfigAdminService.addListener(k8sApiConfigListener);
+
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        k8sApiConfigAdminService.removeListener(k8sApiConfigListener);
+        leadershipService.withdraw(appId.name());
+        eventExecutor.shutdown();
+
+        log.info("Stopped");
+    }
+
+    /**
+     * Checks the validity of the given kubernetes API server configuration.
+     *
+     * @param config kubernetes API server configuration
+     * @return validity result
+     */
+    private boolean checkApiServerConfig(K8sApiConfig config) {
+        KubernetesClient k8sClient = k8sClient(config);
+        return k8sClient != null && k8sClient.getApiVersion() != null;
+    }
+
+    private void bootstrapK8sNodes(K8sApiConfig config) {
+        KubernetesClient k8sClient = k8sClient(config);
+
+        if (k8sClient == null) {
+            log.warn("Failed to connect to kubernetes API server");
+            return;
+        }
+
+        k8sClient.nodes().list().getItems().forEach(n ->
+            k8sNodeAdminService.createNode(buildK8sNode(n))
+        );
+    }
+
+    private K8sNode buildK8sNode(Node node) {
+        String hostname = node.getMetadata().getName();
+        IpAddress managementIp = null;
+        IpAddress dataIp = null;
+
+        for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {
+            // we need to consider assigning managementIp and dataIp differently
+            // FIXME: ExternalIp is not considered currently
+            if (nodeAddress.getType().equals(INTERNAL_IP)) {
+                managementIp = IpAddress.valueOf(nodeAddress.getAddress());
+                dataIp = IpAddress.valueOf(nodeAddress.getAddress());
+            }
+        }
+
+        String roleStr = node.getMetadata().getLabels().keySet().stream()
+                .filter(l -> l.contains(K8S_ROLE))
+                .findFirst().orElse(null);
+
+        K8sNode.Type nodeType = MASTER;
+
+        if (roleStr != null) {
+            String role = roleStr.split("/")[1];
+            if (MASTER.name().equalsIgnoreCase(role)) {
+                nodeType = MASTER;
+            } else {
+                nodeType = MINION;
+            }
+        }
+
+        return DefaultK8sNode.builder()
+                .hostname(hostname)
+                .managementIp(managementIp)
+                .dataIp(dataIp)
+                .type(nodeType)  // need to get correct node type
+                .state(INIT)
+                .build();
+    }
+
+    /**
+     * An internal kubernetes API server config listener.
+     * The notification is triggered by K8sApiConfigStore.
+     */
+    private class InternalK8sApiConfigListener implements K8sApiConfigListener {
+
+        private boolean isRelevantHelper() {
+            return Objects.equals(localNode, leadershipService.getLeader(appId.name()));
+        }
+
+        @Override
+        public void event(K8sApiConfigEvent event) {
+
+            switch (event.type()) {
+                case K8S_API_CONFIG_CREATED:
+                    eventExecutor.execute(() -> processConfigCreation(event.subject()));
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        private void processConfigCreation(K8sApiConfig config) {
+            if (!isRelevantHelper()) {
+                return;
+            }
+
+            if (checkApiServerConfig(config)) {
+                K8sApiConfig newConfig = config.updateState(K8sApiConfig.State.CONNECTED);
+                k8sApiConfigAdminService.updateApiConfig(newConfig);
+                bootstrapK8sNodes(config);
+            }
+        }
+    }
+}
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DistributedK8sApiConfigStore.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DistributedK8sApiConfigStore.java
index 321aac0..e5a65ab 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DistributedK8sApiConfigStore.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DistributedK8sApiConfigStore.java
@@ -73,6 +73,7 @@
             .register(K8sApiConfig.class)
             .register(DefaultK8sApiConfig.class)
             .register(K8sApiConfig.Scheme.class)
+            .register(K8sApiConfig.State.class)
             .register(Collection.class)
             .build();
 
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/K8sNodeManager.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/K8sNodeManager.java
index d80ef21..0289422 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/K8sNodeManager.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/K8sNodeManager.java
@@ -33,6 +33,7 @@
 import org.onosproject.k8snode.api.K8sNodeStoreDelegate;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.device.DeviceService;
+import org.onosproject.store.service.AtomicCounter;
 import org.onosproject.store.service.StorageService;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
@@ -45,6 +46,7 @@
 
 import java.util.Dictionary;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
@@ -56,6 +58,7 @@
 import static org.onosproject.k8snode.api.K8sNodeState.COMPLETE;
 import static org.onosproject.k8snode.impl.OsgiPropertyConstants.OVSDB_PORT;
 import static org.onosproject.k8snode.impl.OsgiPropertyConstants.OVSDB_PORT_NUM_DEFAULT;
+import static org.onosproject.k8snode.util.K8sNodeUtil.genDpid;
 import static org.slf4j.LoggerFactory.getLogger;
 
 /**
@@ -81,6 +84,10 @@
 
     private static final String ERR_NULL_NODE = "Kubernetes node cannot be null";
     private static final String ERR_NULL_HOSTNAME = "Kubernetes node hostname cannot be null";
+    private static final String ERR_NULL_DEVICE_ID = "Kubernetes node device ID cannot be null";
+
+    private static final String DEVICE_ID_COUNTER_NAME = "device-id-counter";
+    private static final String NOT_DUPLICATED_MSG = "% cannot be duplicated";
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected K8sNodeStore nodeStore;
@@ -108,6 +115,8 @@
 
     private final K8sNodeStoreDelegate delegate = new K8sNodeManager.InternalNodeStoreDelegate();
 
+    private AtomicCounter deviceIdCounter;
+
     private ApplicationId appId;
 
     @Activate
@@ -117,6 +126,8 @@
 
         leadershipService.runForLeadership(appId.name());
 
+        deviceIdCounter = storageService.getAtomicCounter(DEVICE_ID_COUNTER_NAME);
+
         log.info("Started");
     }
 
@@ -144,15 +155,48 @@
     @Override
     public void createNode(K8sNode node) {
         checkNotNull(node, ERR_NULL_NODE);
-        nodeStore.createNode(node);
-        log.info(String.format(MSG_NODE, node.hostname(), MSG_CREATED));
+
+        K8sNode updatedNode;
+
+        if (node.intgBridge() == null) {
+            String deviceIdStr = genDpid(deviceIdCounter.incrementAndGet());
+            checkNotNull(deviceIdStr, ERR_NULL_DEVICE_ID);
+            updatedNode = node.updateIntgBridge(DeviceId.deviceId(deviceIdStr));
+            checkArgument(!hasIntgBridge(updatedNode.intgBridge(), updatedNode.hostname()),
+                    NOT_DUPLICATED_MSG, updatedNode.intgBridge());
+        } else {
+            updatedNode = node;
+            checkArgument(!hasIntgBridge(updatedNode.intgBridge(), updatedNode.hostname()),
+                    NOT_DUPLICATED_MSG, updatedNode.intgBridge());
+        }
+
+        nodeStore.createNode(updatedNode);
+        log.info(String.format(MSG_NODE, updatedNode.hostname(), MSG_CREATED));
     }
 
     @Override
     public void updateNode(K8sNode node) {
         checkNotNull(node, ERR_NULL_NODE);
-        nodeStore.updateNode(node);
-        log.info(String.format(MSG_NODE, node.hostname(), MSG_UPDATED));
+
+        K8sNode updatedNode;
+
+        K8sNode existingNode = nodeStore.node(node.hostname());
+        checkNotNull(existingNode, ERR_NULL_NODE);
+
+        DeviceId existDeviceId = nodeStore.node(node.hostname()).intgBridge();
+
+        if (node.intgBridge() == null) {
+            updatedNode = node.updateIntgBridge(existDeviceId);
+            checkArgument(!hasIntgBridge(updatedNode.intgBridge(), updatedNode.hostname()),
+                    NOT_DUPLICATED_MSG, updatedNode.intgBridge());
+        } else {
+            updatedNode = node;
+            checkArgument(!hasIntgBridge(updatedNode.intgBridge(), updatedNode.hostname()),
+                    NOT_DUPLICATED_MSG, updatedNode.intgBridge());
+        }
+
+        nodeStore.updateNode(updatedNode);
+        log.info(String.format(MSG_NODE, updatedNode.hostname(), MSG_UPDATED));
     }
 
     @Override
@@ -206,6 +250,15 @@
                 .findFirst().orElse(null);
     }
 
+    private boolean hasIntgBridge(DeviceId deviceId, String hostname) {
+        Optional<K8sNode> existNode = nodeStore.nodes().stream()
+                .filter(n -> !n.hostname().equals(hostname))
+                .filter(n -> n.intgBridge().equals(deviceId))
+                .findFirst();
+
+        return existNode.isPresent();
+    }
+
     private class InternalNodeStoreDelegate implements K8sNodeStoreDelegate {
 
         @Override
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/K8sNodeUtil.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/K8sNodeUtil.java
index 7fea9cf..2413f46 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/K8sNodeUtil.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/K8sNodeUtil.java
@@ -17,6 +17,9 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.Strings;
+import io.fabric8.kubernetes.client.ConfigBuilder;
+import io.fabric8.kubernetes.client.DefaultKubernetesClient;
+import io.fabric8.kubernetes.client.KubernetesClient;
 import org.apache.commons.lang.StringUtils;
 import org.onlab.packet.IpAddress;
 import org.onosproject.k8snode.api.K8sApiConfig;
@@ -46,6 +49,10 @@
     private static final String COLON_SLASH = "://";
     private static final String COLON = ":";
 
+    private static final int HEX_LENGTH = 16;
+    private static final String OF_PREFIX = "of:";
+    private static final String ZERO = "0";
+
     /**
      * Prevents object installation from external.
      */
@@ -184,4 +191,52 @@
     public static String endpoint(K8sApiConfig apiConfig) {
         return endpoint(apiConfig.scheme(), apiConfig.ipAddress(), apiConfig.port());
     }
+
+    /**
+     * Generates a DPID (of:0000000000000001) from an index value.
+     *
+     * @param index index value
+     * @return generated DPID
+     */
+    public static String genDpid(long index) {
+        if (index < 0) {
+            return null;
+        }
+
+        String hexStr = Long.toHexString(index);
+
+        StringBuilder zeroPadding = new StringBuilder();
+        for (int i = 0; i < HEX_LENGTH - hexStr.length(); i++) {
+            zeroPadding.append(ZERO);
+        }
+
+        return OF_PREFIX + zeroPadding.toString() + hexStr;
+    }
+
+    /**
+     * Obtains workable kubernetes client.
+     *
+     * @param config kubernetes API config
+     * @return kubernetes client
+     */
+    public static KubernetesClient k8sClient(K8sApiConfig config) {
+        if (config == null) {
+            log.warn("Kubernetes API server config is empty.");
+            return null;
+        }
+
+        String endpoint = endpoint(config);
+
+        ConfigBuilder configBuilder = new ConfigBuilder().withMasterUrl(endpoint);
+
+        if (config.scheme() == K8sApiConfig.Scheme.HTTPS) {
+            configBuilder.withTrustCerts(true)
+                    .withOauthToken(config.token())
+                    .withCaCertData(config.caCertData())
+                    .withClientCertData(config.clientCertData())
+                    .withClientKeyData(config.clientKeyData());
+        }
+
+        return new DefaultKubernetesClient(configBuilder.build());
+    }
 }
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigCodecTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigCodecTest.java
index ece2ef8..cca918e 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigCodecTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigCodecTest.java
@@ -39,6 +39,7 @@
 import static org.easymock.EasyMock.replay;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.notNullValue;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.CONNECTED;
 import static org.onosproject.k8snode.codec.K8sApiConfigJsonMatcher.matchesK8sApiConfig;
 import static org.onosproject.net.NetTestTools.APP_ID;
 
@@ -79,6 +80,7 @@
                 .scheme(K8sApiConfig.Scheme.HTTPS)
                 .ipAddress(IpAddress.valueOf("10.10.10.23"))
                 .port(6443)
+                .state(CONNECTED)
                 .token("token")
                 .caCertData("caCertData")
                 .clientCertData("clientCertData")
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigJsonMatcher.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigJsonMatcher.java
index df1ac2f..2eb42b9 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigJsonMatcher.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sApiConfigJsonMatcher.java
@@ -30,6 +30,7 @@
     private static final String SCHEME = "scheme";
     private static final String IP_ADDRESS = "ipAddress";
     private static final String PORT = "port";
+    private static final String STATE = "state";
     private static final String TOKEN = "token";
     private static final String CA_CERT_DATA = "caCertData";
     private static final String CLIENT_CERT_DATA = "clientCertData";
@@ -66,6 +67,16 @@
             return false;
         }
 
+        // check state
+        JsonNode jsonState = jsonNode.get(STATE);
+        String state = k8sApiConfig.state().name();
+        if (jsonState != null) {
+            if (!jsonState.asText().equals(state)) {
+                description.appendText("state was " + jsonState);
+                return false;
+            }
+        }
+
         // check token
         JsonNode jsonToken = jsonNode.get(TOKEN);
         String token = k8sApiConfig.token();
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sApiConfigManagerTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sApiConfigManagerTest.java
index 90f56c3..f46feb8 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sApiConfigManagerTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sApiConfigManagerTest.java
@@ -40,6 +40,7 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.DISCONNECTED;
 import static org.onosproject.k8snode.api.K8sApiConfigEvent.Type.K8S_API_CONFIG_CREATED;
 import static org.onosproject.k8snode.api.K8sApiConfigEvent.Type.K8S_API_CONFIG_REMOVED;
 import static org.onosproject.k8snode.util.K8sNodeUtil.endpoint;
@@ -74,11 +75,13 @@
                 .scheme(K8sApiConfig.Scheme.HTTP)
                 .ipAddress(IpAddress.valueOf("10.10.10.2"))
                 .port(6443)
+                .state(DISCONNECTED)
                 .build();
         apiConfig2 = DefaultK8sApiConfig.builder()
                 .scheme(K8sApiConfig.Scheme.HTTPS)
                 .ipAddress(IpAddress.valueOf("10.10.10.3"))
                 .port(6443)
+                .state(DISCONNECTED)
                 .token("token")
                 .caCertData("caCertData")
                 .clientCertData("clientCertData")
@@ -88,6 +91,7 @@
                 .scheme(K8sApiConfig.Scheme.HTTP)
                 .ipAddress(IpAddress.valueOf("10.10.10.4"))
                 .port(8080)
+                .state(DISCONNECTED)
                 .build();
 
         configStore = new DistributedK8sApiConfigStore();
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
index 066647b..a07d60e 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java
@@ -231,7 +231,7 @@
     /**
      * Checks if updating not existing node fails with proper exception.
      */
-    @Test(expected = IllegalArgumentException.class)
+    @Test(expected = NullPointerException.class)
     public void testUpdateNotExistingNode() {
         target.updateNode(MINION_1);
     }
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
index 75d4433..90f7d0d 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/web/K8sNodeWebResourceTest.java
@@ -49,6 +49,7 @@
 import static org.easymock.EasyMock.verify;
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
+import static org.onosproject.k8snode.api.K8sApiConfig.State.DISCONNECTED;
 
 /**
  * Unit test for Kubernetes node REST API.
@@ -100,6 +101,7 @@
                 .scheme(K8sApiConfig.Scheme.HTTPS)
                 .ipAddress(IpAddress.valueOf("10.134.34.223"))
                 .port(6443)
+                .state(DISCONNECTED)
                 .token("tokenMod")
                 .caCertData("caCertData")
                 .clientCertData("clientCertData")
