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 4abac0f..22c39e4 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
@@ -19,10 +19,14 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
 import org.onosproject.k8snode.api.K8sApiConfig.Scheme;
 
 import static junit.framework.TestCase.assertEquals;
 import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
+import static org.onosproject.k8snode.api.K8sApiConfig.Mode;
+import static org.onosproject.k8snode.api.K8sApiConfig.Mode.NORMAL;
+import static org.onosproject.k8snode.api.K8sApiConfig.Mode.PASSTHROUGH;
 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;
@@ -33,9 +37,19 @@
  */
 public final class DefaultK8sApiConfigTest {
 
+    private static final String CLUSTER_NAME = "kubernetes";
+
+    private static final int SEGMENT_ID_1 = 1;
+    private static final int SEGMENT_ID_2 = 2;
+
+    private static final IpPrefix EXT_NETWORK_CIDR = IpPrefix.valueOf("192.168.200.0/0");
+
     private static final Scheme SCHEME_1 = HTTP;
     private static final Scheme SCHEME_2 = HTTPS;
 
+    private static final Mode MODE_1 = NORMAL;
+    private static final Mode MODE_2 = PASSTHROUGH;
+
     private static final IpAddress IP_ADDRESS_1 = IpAddress.valueOf("192.168.0.200");
     private static final IpAddress IP_ADDRESS_2 = IpAddress.valueOf("192.168.0.201");
 
@@ -72,6 +86,10 @@
     @Before
     public void setUp() {
         config1 = DefaultK8sApiConfig.builder()
+                .clusterName(CLUSTER_NAME)
+                .segmentId(SEGMENT_ID_1)
+                .extNetworkCidr(EXT_NETWORK_CIDR)
+                .mode(NORMAL)
                 .scheme(SCHEME_1)
                 .ipAddress(IP_ADDRESS_1)
                 .port(PORT_1)
@@ -83,6 +101,10 @@
                 .build();
 
         sameAsConfig1 = DefaultK8sApiConfig.builder()
+                .clusterName(CLUSTER_NAME)
+                .segmentId(SEGMENT_ID_1)
+                .extNetworkCidr(EXT_NETWORK_CIDR)
+                .mode(NORMAL)
                 .scheme(SCHEME_1)
                 .ipAddress(IP_ADDRESS_1)
                 .port(PORT_1)
@@ -94,6 +116,10 @@
                 .build();
 
         config2 = DefaultK8sApiConfig.builder()
+                .clusterName(CLUSTER_NAME)
+                .segmentId(SEGMENT_ID_2)
+                .extNetworkCidr(EXT_NETWORK_CIDR)
+                .mode(PASSTHROUGH)
                 .scheme(SCHEME_2)
                 .ipAddress(IP_ADDRESS_2)
                 .port(PORT_2)
@@ -122,7 +148,11 @@
     public void testConstruction() {
         K8sApiConfig config = config1;
 
+        assertEquals(CLUSTER_NAME, config.clusterName());
+        assertEquals(SEGMENT_ID_1, config.segmentId());
+        assertEquals(EXT_NETWORK_CIDR, config.extNetworkCidr());
         assertEquals(SCHEME_1, config.scheme());
+        assertEquals(MODE_1, config.mode());
         assertEquals(IP_ADDRESS_1, config.ipAddress());
         assertEquals(PORT_1, config.port());
         assertEquals(CONNECTED, config.state());
diff --git a/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sHostTest.java b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sHostTest.java
new file mode 100644
index 0000000..693fce4
--- /dev/null
+++ b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sHostTest.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2020-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.api;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.testing.EqualsTester;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+
+import java.util.Set;
+
+import static junit.framework.TestCase.assertEquals;
+import static org.onosproject.k8snode.api.K8sHostState.COMPLETE;
+import static org.onosproject.k8snode.api.K8sHostState.INIT;
+
+/**
+ * Unit test for DefaultK8sHost.
+ */
+public final class DefaultK8sHostTest {
+
+    private static final IpAddress HOST_IP_1 = IpAddress.valueOf("192.168.200.3");
+    private static final IpAddress HOST_IP_2 = IpAddress.valueOf("192.168.200.4");
+
+    private static final Set<String> NODE_NAMES_1 = ImmutableSet.of("1", "2");
+    private static final Set<String> NODE_NAMES_2 = ImmutableSet.of("3", "4");
+
+    private K8sHost refHost;
+
+    private static final K8sHost K8S_HOST_1 = createHost(
+            HOST_IP_1,
+            NODE_NAMES_1,
+            INIT
+    );
+
+    private static final K8sHost K8S_HOST_2 = createHost(
+            HOST_IP_1,
+            NODE_NAMES_1,
+            INIT
+    );
+
+    private static final K8sHost K8S_HOST_3 = createHost(
+            HOST_IP_2,
+            NODE_NAMES_2,
+            COMPLETE
+    );
+
+    /**
+     * Initial setup for this unit test.
+     */
+    @Before
+    public void setUp() {
+        refHost = DefaultK8sHost.builder()
+                .hostIp(HOST_IP_1)
+                .nodeNames(NODE_NAMES_1)
+                .state(INIT)
+                .build();
+    }
+
+    /**
+     * Checks equals method works as expected.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester().addEqualityGroup(K8S_HOST_1, K8S_HOST_2)
+                .addEqualityGroup(K8S_HOST_3)
+                .testEquals();
+    }
+
+    /**
+     * Test object construction.
+     */
+    @Test
+    public void testConstruction() {
+        assertEquals(refHost.hostIp(), HOST_IP_1);
+        assertEquals(refHost.nodeNames(), NODE_NAMES_1);
+        assertEquals(refHost.state(), INIT);
+    }
+
+    /**
+     * Checks the functionality of update state method.
+     */
+    @Test
+    public void testUpdateState() {
+        K8sHost updatedHost = refHost.updateState(COMPLETE);
+
+        assertEquals(updatedHost.hostIp(), HOST_IP_1);
+        assertEquals(updatedHost.nodeNames(), NODE_NAMES_1);
+        assertEquals(updatedHost.state(), COMPLETE);
+    }
+
+    private static K8sHost createHost(IpAddress hostIp, Set<String> nodeNames, K8sHostState state) {
+        return DefaultK8sHost.builder()
+                .hostIp(hostIp)
+                .nodeNames(nodeNames)
+                .state(state)
+                .build();
+    }
+}
diff --git a/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sNodeTest.java b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sNodeTest.java
index 463d89d..26553a8 100644
--- a/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sNodeTest.java
+++ b/apps/k8s-node/api/src/test/java/org/onosproject/k8snode/api/DefaultK8sNodeTest.java
@@ -41,10 +41,13 @@
 
     private static final IpAddress TEST_IP = IpAddress.valueOf("10.100.0.3");
 
+    private static final String CLUSTER_NAME = "cluster";
     private static final String HOSTNAME_1 = "hostname_1";
     private static final String HOSTNAME_2 = "hostname_2";
     private static final Device DEVICE_1 = createDevice(1);
     private static final Device DEVICE_2 = createDevice(2);
+    private static final int SEGMENT_ID_1 = 1;
+    private static final int SEGMENT_ID_2 = 2;
 
     private static final IpAddress MANAGEMENT_IP = IpAddress.valueOf("10.10.10.10");
     private static final IpAddress DATA_IP = IpAddress.valueOf("20.20.20.20");
@@ -64,8 +67,11 @@
     private K8sNode refNode;
 
     private static final K8sNode K8S_NODE_1 = createNode(
+            CLUSTER_NAME,
             HOSTNAME_1,
             MINION,
+            SEGMENT_ID_1,
+            DEVICE_1,
             DEVICE_1,
             DEVICE_1,
             DEVICE_1,
@@ -76,8 +82,11 @@
             EXT_GATEWAY_IP_1,
             POD_CIDR_1);
     private static final K8sNode K8S_NODE_2 = createNode(
+            CLUSTER_NAME,
             HOSTNAME_1,
             MINION,
+            SEGMENT_ID_1,
+            DEVICE_1,
             DEVICE_1,
             DEVICE_1,
             DEVICE_1,
@@ -88,8 +97,11 @@
             EXT_GATEWAY_IP_1,
             POD_CIDR_1);
     private static final K8sNode K8S_NODE_3 = createNode(
+            CLUSTER_NAME,
             HOSTNAME_2,
             MINION,
+            SEGMENT_ID_2,
+            DEVICE_2,
             DEVICE_2,
             DEVICE_2,
             DEVICE_2,
@@ -106,13 +118,16 @@
     @Before
     public void setUp() {
         refNode = DefaultK8sNode.builder()
+                .clusterName(CLUSTER_NAME)
                 .hostname(HOSTNAME_1)
                 .type(MINION)
+                .segmentId(SEGMENT_ID_1)
                 .managementIp(MANAGEMENT_IP)
                 .dataIp(DATA_IP)
                 .intgBridge(DEVICE_1.id())
                 .extBridge(DEVICE_1.id())
                 .localBridge(DEVICE_1.id())
+                .tunBridge(DEVICE_1.id())
                 .extIntf(BRIDGE_INTF_1)
                 .state(COMPLETE)
                 .extBridgeIp(EXT_BRIDGE_IP_1)
@@ -141,6 +156,7 @@
         assertEquals(refNode.intgBridge(), DEVICE_1.id());
         assertEquals(refNode.extBridge(), DEVICE_1.id());
         assertEquals(refNode.localBridge(), DEVICE_1.id());
+        assertEquals(refNode.tunBridge(), DEVICE_1.id());
     }
 
     /**
@@ -171,9 +187,12 @@
     public void testBuildWithoutHostname() {
         DefaultK8sNode.builder()
                 .type(MINION)
+                .clusterName(CLUSTER_NAME)
+                .segmentId(SEGMENT_ID_1)
                 .intgBridge(DEVICE_1.id())
                 .extBridge(DEVICE_1.id())
                 .localBridge(DEVICE_1.id())
+                .tunBridge(DEVICE_1.id())
                 .extIntf(BRIDGE_INTF_1)
                 .managementIp(TEST_IP)
                 .dataIp(TEST_IP)
@@ -191,9 +210,12 @@
     public void testBuildWithoutType() {
         DefaultK8sNode.builder()
                 .hostname(HOSTNAME_1)
+                .clusterName(CLUSTER_NAME)
+                .segmentId(SEGMENT_ID_1)
                 .intgBridge(DEVICE_1.id())
                 .extBridge(DEVICE_1.id())
                 .localBridge(DEVICE_1.id())
+                .tunBridge(DEVICE_1.id())
                 .extIntf(BRIDGE_INTF_1)
                 .managementIp(TEST_IP)
                 .dataIp(TEST_IP)
@@ -211,11 +233,14 @@
     @Test(expected = IllegalArgumentException.class)
     public void testBuildWithoutManagementIp() {
         DefaultK8sNode.builder()
+                .clusterName(CLUSTER_NAME)
                 .hostname(HOSTNAME_1)
                 .type(MINION)
+                .segmentId(SEGMENT_ID_1)
                 .intgBridge(DEVICE_1.id())
                 .extBridge(DEVICE_1.id())
                 .localBridge(DEVICE_1.id())
+                .tunBridge(DEVICE_1.id())
                 .extIntf(BRIDGE_INTF_1)
                 .dataIp(TEST_IP)
                 .state(INIT)
@@ -226,6 +251,7 @@
     }
 
     private void checkCommonProperties(K8sNode node) {
+        assertEquals(node.clusterName(), CLUSTER_NAME);
         assertEquals(node.hostname(), HOSTNAME_1);
         assertEquals(node.type(), MINION);
         assertEquals(node.managementIp(), MANAGEMENT_IP);
@@ -243,18 +269,21 @@
                 new ChassisId(1));
     }
 
-    private static K8sNode createNode(String hostname, Type type,
-                                      Device intgBridge, Device extBridge,
-                                      Device localBridge, String bridgeIntf,
+    private static K8sNode createNode(String clusterName, String hostname, Type type,
+                                      int segmentId, Device intgBridge, Device extBridge,
+                                      Device localBridge, Device tunBridge, String bridgeIntf,
                                       IpAddress ipAddr, K8sNodeState state,
                                       IpAddress extBridgeIp, IpAddress extGatewayIp,
                                       String podCidr) {
         return DefaultK8sNode.builder()
+                .clusterName(clusterName)
                 .hostname(hostname)
                 .type(type)
+                .segmentId(segmentId)
                 .intgBridge(intgBridge.id())
                 .extBridge(extBridge.id())
                 .localBridge(localBridge.id())
+                .tunBridge(tunBridge.id())
                 .extIntf(bridgeIntf)
                 .managementIp(ipAddr)
                 .dataIp(ipAddr)
