diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeCodecTest.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeCodecTest.java
index 7f156e8..556e462 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeCodecTest.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeCodecTest.java
@@ -84,6 +84,9 @@
                 .managementIp(IpAddress.valueOf("10.10.10.1"))
                 .dataIp(IpAddress.valueOf("20.20.20.2"))
                 .intgBridge(DeviceId.deviceId("kbr-int"))
+                .extIntf("eth1")
+                .extBridgeIp(IpAddress.valueOf("10.10.10.5"))
+                .extGatewayIp(IpAddress.valueOf("10.10.10.1"))
                 .build();
 
         ObjectNode nodeJson = k8sNodeCodec.encode(node, context);
@@ -104,6 +107,9 @@
         assertEquals("172.16.130.4", node.managementIp().toString());
         assertEquals("172.16.130.4", node.dataIp().toString());
         assertEquals("of:00000000000000a1", node.intgBridge().toString());
+        assertEquals("eth1", node.extIntf());
+        assertEquals("172.16.130.5", node.extBridgeIp().toString());
+        assertEquals("172.16.130.1", node.extGatewayIp().toString());
     }
 
     private K8sNode getK8sNode(String resourceName) throws IOException {
diff --git a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeJsonMatcher.java b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeJsonMatcher.java
index 58b15d2..b953f54 100644
--- a/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeJsonMatcher.java
+++ b/apps/k8s-node/app/src/test/java/org/onosproject/k8snode/codec/K8sNodeJsonMatcher.java
@@ -18,6 +18,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import org.hamcrest.Description;
 import org.hamcrest.TypeSafeDiagnosingMatcher;
+import org.onlab.packet.IpAddress;
 import org.onosproject.k8snode.api.K8sNode;
 
 /**
@@ -33,6 +34,9 @@
     private static final String DATA_IP = "dataIp";
     private static final String INTEGRATION_BRIDGE = "integrationBridge";
     private static final String STATE = "state";
+    private static final String EXTERNAL_INTF = "externalInterface";
+    private static final String EXTERNAL_BRIDGE_IP = "externalBridgeIp";
+    private static final String EXTERNAL_GATEWAY_IP = "externalGatewayIp";
 
     private K8sNodeJsonMatcher(K8sNode node) {
         this.node = node;
@@ -93,6 +97,36 @@
             }
         }
 
+        // check external interface
+        JsonNode jsonExtIntf = jsonNode.get(EXTERNAL_INTF);
+        if (jsonExtIntf != null) {
+            String extIntf = node.extIntf();
+            if (!jsonExtIntf.asText().equals(extIntf)) {
+                description.appendText("External interface was " + jsonExtIntf.asText());
+                return false;
+            }
+        }
+
+        // check external bridge IP
+        JsonNode jsonExtBridgeIp = jsonNode.get(EXTERNAL_BRIDGE_IP);
+        if (jsonExtBridgeIp != null) {
+            IpAddress extBridgeIp = node.extBridgeIp();
+            if (!jsonExtBridgeIp.asText().equals(extBridgeIp.toString())) {
+                description.appendText("External bridge IP was " + jsonExtBridgeIp.asText());
+                return false;
+            }
+        }
+
+        // check external gateway IP
+        JsonNode jsonExtGatewayIp = jsonNode.get(EXTERNAL_GATEWAY_IP);
+        if (jsonExtGatewayIp != null) {
+            IpAddress extGatewayIp = node.extGatewayIp();
+            if (!jsonExtGatewayIp.asText().equals(extGatewayIp.toString())) {
+                description.appendText("External gateway IP was " + jsonExtGatewayIp.asText());
+                return false;
+            }
+        }
+
         return true;
     }
 
