Implement kubernetes external loadbalancer handler.

Change-Id: I0f3057d66769f0ca7db7d508483835cdd1ff1593
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/Constants.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/Constants.java
index 3d2f14c..0957fb7 100644
--- a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/Constants.java
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/Constants.java
@@ -49,4 +49,11 @@
     public static final String DEFAULT_CLUSTER_NAME = "default";
 
     public static final String SONA_PROJECT_DOMAIN = "sonaproject.github.io";
+
+    // CLI item length
+    public static final int CLI_NAME_LENGTH = 30;
+    public static final int CLI_IP_ADDRESSES_LENGTH = 50;
+    public static final int CLI_IP_ADDRESS_LENGTH = 25;
+    public static final int CLI_MAC_ADDRESS_LENGTH = 25;
+    public static final int CLI_MARGIN_LENGTH = 2;
 }
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbConfig.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbConfig.java
new file mode 100644
index 0000000..1147ac7
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbConfig.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import com.google.common.base.MoreObjects;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * Default implementation of kubernetes external lb config.
+ */
+public final class DefaultKubernetesExternalLbConfig implements KubernetesExternalLbConfig {
+
+    private static final String NOT_NULL_MSG = "ExternalLbConfig % cannot be null";
+
+    private final String configName;
+    private final IpAddress loadBalancerGwIp;
+    private final MacAddress loadBalancerGwMac;
+    private final String globalIpRange;
+
+    public DefaultKubernetesExternalLbConfig(String configName, IpAddress loadBalancerGwIp,
+                                             MacAddress loadBalancerGwMac, String globalIpRange) {
+        this.configName = configName;
+        this.loadBalancerGwIp = loadBalancerGwIp;
+        this.loadBalancerGwMac = loadBalancerGwMac;
+        this.globalIpRange = globalIpRange;
+    }
+
+    @Override
+    public String configName() {
+        return configName;
+    }
+
+    @Override
+    public IpAddress loadBalancerGwIp() {
+        return loadBalancerGwIp;
+    }
+
+    @Override
+    public MacAddress loadBalancerGwMac() {
+        return loadBalancerGwMac;
+    }
+
+    @Override
+    public String globalIpRange() {
+        return globalIpRange;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        DefaultKubernetesExternalLbConfig that = (DefaultKubernetesExternalLbConfig) o;
+
+        return Objects.equals(configName, that.configName) &&
+                Objects.equals(loadBalancerGwIp, that.loadBalancerGwIp) &&
+                Objects.equals(globalIpRange, that.globalIpRange);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(configName, loadBalancerGwIp, globalIpRange);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("configName", configName)
+                .add("loadBalancerGwIp", loadBalancerGwIp)
+                .add("loadBalancerGwMac", loadBalancerGwMac)
+                .add("globalIpRange", globalIpRange)
+                .toString();
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    @Override
+    public KubernetesExternalLbConfig updateLbGatewayMac(MacAddress gatewayMac) {
+        return DefaultKubernetesExternalLbConfig.builder()
+                .configName(configName)
+                .loadBalancerGwIp(loadBalancerGwIp)
+                .loadBalancerGwMac(loadBalancerGwMac)
+                .globalIpRange(globalIpRange)
+                .build();
+    }
+
+    public static final class Builder implements KubernetesExternalLbConfig.Builder {
+
+        private String configName;
+        private IpAddress loadBalancerGwIp;
+        private MacAddress loadBalancerGwMac;
+        private String globalIpRange;
+
+        private Builder() {
+        }
+
+        @Override
+        public KubernetesExternalLbConfig build() {
+            checkArgument(configName != null, NOT_NULL_MSG, "configName");
+            checkArgument(loadBalancerGwIp != null, NOT_NULL_MSG, "loadBalancerGwIp");
+            checkArgument(globalIpRange != null, NOT_NULL_MSG, "globalIpRange");
+
+            return new DefaultKubernetesExternalLbConfig(configName, loadBalancerGwIp,
+                    loadBalancerGwMac, globalIpRange);
+        }
+
+        @Override
+        public Builder configName(String configName) {
+            this.configName = configName;
+            return this;
+        }
+
+        @Override
+        public Builder loadBalancerGwIp(IpAddress loadBalancerGwIp) {
+            this.loadBalancerGwIp = loadBalancerGwIp;
+            return this;
+        }
+
+        @Override
+        public KubernetesExternalLbConfig.Builder loadBalancerGwMac(MacAddress loadBalancerGwMac) {
+            this.loadBalancerGwMac = loadBalancerGwMac;
+            return this;
+        }
+
+        @Override
+        public Builder globalIpRange(String globalIpRange) {
+            this.globalIpRange = globalIpRange;
+            return this;
+        }
+    }
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbInterface.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbInterface.java
new file mode 100644
index 0000000..fe53b53
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubernetesExternalLbInterface.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import com.google.common.base.MoreObjects;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+public class DefaultKubernetesExternalLbInterface implements KubernetesExternalLbInterface {
+
+    private static final String NOT_NULL_MSG = "KubernetesExternalLbInterface % cannot be null";
+
+    private String elbBridgeName;
+    private IpAddress elbIp;
+    private IpAddress elbGwIp;
+    private MacAddress elbGwMac;
+
+    public DefaultKubernetesExternalLbInterface(String elbBridgeName, IpAddress elbIp,
+                                                IpAddress elbGwIp, MacAddress elbGwMac) {
+        this.elbBridgeName = elbBridgeName;
+        this.elbIp = elbIp;
+        this.elbGwIp = elbGwIp;
+        this.elbGwMac = elbGwMac;
+    }
+
+    @Override
+    public String externalLbBridgeName() {
+        return elbBridgeName;
+    }
+
+    @Override
+    public IpAddress externalLbIp() {
+        return elbIp;
+    }
+
+    @Override
+    public IpAddress externalLbGwIp() {
+        return elbGwIp;
+    }
+
+    @Override
+    public MacAddress externalLbGwMac() {
+        return elbGwMac;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        DefaultKubernetesExternalLbInterface that = (DefaultKubernetesExternalLbInterface) o;
+
+        return Objects.equals(elbBridgeName, that.elbBridgeName) &&
+                Objects.equals(elbIp, that.elbIp) &&
+                Objects.equals(elbGwIp, that.elbGwIp);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("elbBridgeName", elbBridgeName)
+                .add("elbIp", elbIp)
+                .add("elbGwIp", elbGwIp)
+                .add("elbGwMac", elbGwMac)
+                .toString();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(elbBridgeName, elbIp, elbGwIp);
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    public static final class Builder implements KubernetesExternalLbInterface.Builder {
+        private String elbBridgeName;
+        private IpAddress elbIp;
+        private IpAddress elbGwIp;
+        private MacAddress elbGwMac;
+
+        private Builder() {
+        }
+
+        @Override
+        public KubernetesExternalLbInterface build() {
+            checkArgument(elbBridgeName != null, NOT_NULL_MSG, "externalLbBridgeName");
+            checkArgument(elbIp != null, NOT_NULL_MSG, "externalLbIp");
+            checkArgument(elbGwIp != null, NOT_NULL_MSG, "externalLbGwIp");
+            checkArgument(elbGwMac != null, NOT_NULL_MSG, "externalLbGwMac");
+
+            return new DefaultKubernetesExternalLbInterface(elbBridgeName, elbIp, elbGwIp, elbGwMac);
+        }
+
+        @Override
+        public Builder externalLbBridgeName(String elbBridgeName) {
+            this.elbBridgeName = elbBridgeName;
+            return this;
+        }
+
+        @Override
+        public Builder externalLbIp(IpAddress elbIp) {
+            this.elbIp = elbIp;
+            return this;
+        }
+
+        @Override
+        public Builder externallbGwIp(IpAddress elbGwIp) {
+            this.elbGwIp = elbGwIp;
+            return this;
+        }
+
+        @Override
+        public Builder externalLbGwMac(MacAddress elbGwMac) {
+            this.elbGwMac = elbGwMac;
+            return this;
+        }
+    }
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubevirtNode.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubevirtNode.java
index 16f7034..2c3d0be 100644
--- a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubevirtNode.java
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/DefaultKubevirtNode.java
@@ -59,10 +59,7 @@
     private final KubevirtNodeState state;
     private final Collection<KubevirtPhyInterface> phyIntfs;
     private final String gatewayBridgeName;
-    private final String elbBridgeName;
-    private final IpAddress elbIp;
-    private final IpAddress elbGwIp;
-    private final MacAddress elbGwMac;
+    private final KubernetesExternalLbInterface kubernetesExternalLbIntf;
 
     /**
      * A default constructor of kubevirt node.
@@ -77,18 +74,15 @@
      * @param state             node state
      * @param phyIntfs          physical interfaces
      * @param gatewayBridgeName  gateway bridge name
-     * @param elbBridgeName     elb bridge name
-     * @param elbIp             elb IP address
-     * @param elbGwIp           elb gw IP address
-     * @param elbGwMac          elb gw MAC address
+     * @param kubernetesExternalLbIntf kubernetesExternalLbIntf
      */
     protected DefaultKubevirtNode(String clusterName, String hostname, Type type,
                                   DeviceId intgBridge, DeviceId tunBridge,
                                   IpAddress managementIp, IpAddress dataIp,
                                   KubevirtNodeState state,
                                   Collection<KubevirtPhyInterface> phyIntfs,
-                                  String gatewayBridgeName, String elbBridgeName, IpAddress elbIp,
-                                  IpAddress elbGwIp, MacAddress elbGwMac) {
+                                  String gatewayBridgeName,
+                                  KubernetesExternalLbInterface kubernetesExternalLbIntf) {
         this.clusterName = clusterName;
         this.hostname = hostname;
         this.type = type;
@@ -99,10 +93,7 @@
         this.state = state;
         this.phyIntfs = phyIntfs;
         this.gatewayBridgeName = gatewayBridgeName;
-        this.elbBridgeName = elbBridgeName;
-        this.elbIp = elbIp;
-        this.elbGwIp = elbGwIp;
-        this.elbGwMac = elbGwMac;
+        this.kubernetesExternalLbIntf = kubernetesExternalLbIntf;
     }
 
     @Override
@@ -163,10 +154,7 @@
                 .state(newState)
                 .phyIntfs(phyIntfs)
                 .gatewayBridgeName(gatewayBridgeName)
-                .elbBridgeName(elbBridgeName)
-                .elbIp(elbIp)
-                .elbGwIp(elbGwIp)
-                .elbGwMac(elbGwMac)
+                .kubernetesExternalLbInterface(kubernetesExternalLbIntf)
                 .build();
     }
 
@@ -183,10 +171,7 @@
                 .state(state)
                 .phyIntfs(phyIntfs)
                 .gatewayBridgeName(gatewayBridgeName)
-                .elbBridgeName(elbBridgeName)
-                .elbIp(elbIp)
-                .elbGwIp(elbGwIp)
-                .elbGwMac(elbGwMac)
+                .kubernetesExternalLbInterface(kubernetesExternalLbIntf)
                 .build();
     }
 
@@ -203,10 +188,7 @@
                 .state(state)
                 .phyIntfs(phyIntfs)
                 .gatewayBridgeName(gatewayBridgeName)
-                .elbBridgeName(elbBridgeName)
-                .elbIp(elbIp)
-                .elbGwIp(elbGwIp)
-                .elbGwMac(elbGwMac)
+                .kubernetesExternalLbInterface(kubernetesExternalLbIntf)
                 .build();
     }
 
@@ -259,23 +241,8 @@
     }
 
     @Override
-    public String elbBridgeName() {
-        return elbBridgeName;
-    }
-
-    @Override
-    public IpAddress elbIp() {
-        return elbIp;
-    }
-
-    @Override
-    public IpAddress elbGwIp() {
-        return elbGwIp;
-    }
-
-    @Override
-    public MacAddress elbGwMac() {
-        return elbGwMac;
+    public KubernetesExternalLbInterface kubernetesExternalLbInterface() {
+        return kubernetesExternalLbIntf;
     }
 
     private PortNumber tunnelPort(String tunnelType) {
@@ -343,10 +310,7 @@
                 .state(node.state())
                 .phyIntfs(node.phyIntfs())
                 .gatewayBridgeName(node.gatewayBridgeName())
-                .elbBridgeName(node.elbBridgeName())
-                .elbIp(node.elbIp())
-                .elbGwIp(node.elbGwIp())
-                .elbGwMac(node.elbGwMac());
+                .kubernetesExternalLbInterface(node.kubernetesExternalLbInterface());
     }
 
     @Override
@@ -386,10 +350,7 @@
                 .add("state", state)
                 .add("phyIntfs", phyIntfs)
                 .add("gatewayBridgeName", gatewayBridgeName)
-                .add("elbBridgeName", elbBridgeName)
-                .add("elbIp", elbIp)
-                .add("elbGwIp", elbGwIp)
-                .add("elbGwMac", elbGwMac)
+                .add("kubernetesExternalLbInterface", kubernetesExternalLbIntf)
                 .toString();
     }
 
@@ -409,6 +370,7 @@
         private IpAddress elbIp;
         private IpAddress elbGwIp;
         private MacAddress elbGwMac;
+        private KubernetesExternalLbInterface kubernetesExternalLbInterface;
 
         // private constructor not intended to use from external
         private Builder() {
@@ -436,10 +398,7 @@
                     state,
                     phyIntfs,
                     gatewayBridgeName,
-                    elbBridgeName,
-                    elbIp,
-                    elbGwIp,
-                    elbGwMac
+                    kubernetesExternalLbInterface
             );
         }
 
@@ -504,26 +463,8 @@
         }
 
         @Override
-        public Builder elbBridgeName(String elbBridgeName) {
-            this.elbBridgeName = elbBridgeName;
-            return this;
-        }
-
-        @Override
-        public Builder elbIp(IpAddress elbIp) {
-            this.elbIp = elbIp;
-            return this;
-        }
-
-        @Override
-        public Builder elbGwIp(IpAddress elbGwIp) {
-            this.elbGwIp = elbGwIp;
-            return this;
-        }
-
-        @Override
-        public Builder elbGwMac(MacAddress elbGwMac) {
-            this.elbGwMac = elbGwMac;
+        public Builder kubernetesExternalLbInterface(KubernetesExternalLbInterface kubernetesExternalLbInterface) {
+            this.kubernetesExternalLbInterface = kubernetesExternalLbInterface;
             return this;
         }
     }
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfig.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfig.java
new file mode 100644
index 0000000..a0f1e90
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfig.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+
+/**
+ * Representation of configuration used in Kubernetes External Lb service.
+ */
+public interface KubernetesExternalLbConfig {
+
+    /**
+     * Returns the name of kubernetes external lb config.
+     * This is defined in the configmap.
+     *
+     * @return config name
+     */
+    String configName();
+    /**
+     * Returns the gateway IP of load balancer.
+     * TEG would send outbound traffic to this gateway.
+     *
+     * @return load balancer gateway IP
+     */
+    IpAddress loadBalancerGwIp();
+
+    /**
+     * Returns the gateway MAC of load balancer.
+     * TEG would send outbound traffic to this gateway.
+     *
+     * @return load balancer gateway IP
+     */
+    MacAddress loadBalancerGwMac();
+
+    /**
+     * Returns the global IP range used in external LB.
+     * Each service of type LoadBalancer would get the public IP out of those.
+     * Format: "223.39.6.85-223.39.6.90"
+     *
+     * @return global Ip range
+     */
+    String globalIpRange();
+
+    /**
+     * Returns the KubernetesExternalLbConfig with updated external lb gateway mac address.
+     *
+     * @param gatewayMac external lb gateway mac address
+     * @return KubernetesExternalLbConfig
+     */
+    KubernetesExternalLbConfig updateLbGatewayMac(MacAddress gatewayMac);
+
+    interface Builder {
+        /**
+         * Builds an immutable kubernal external lb config instance.
+         *
+         * @return kubernetes external lb config
+         */
+        KubernetesExternalLbConfig build();
+
+        /**
+         * Returns kubernetes external lb config builder with supplied config name.
+         *
+         * @param configName config name
+         * @return kubernetes external lb config builder
+         */
+        Builder configName(String configName);
+
+        /**
+         * Returns kubernetes external lb config builder with supplied loadbalancer gw Ip.
+         *
+         * @param loadBalancerGwIp loadbalancer gw Ip
+         * @return kubernetes external lb config builder
+         */
+        Builder loadBalancerGwIp(IpAddress loadBalancerGwIp);
+
+        /**
+         * Returns kubernetes external lb config builder with supplied loadbalancer gw Mac.
+         *
+         * @param loadBalancerGwMac loadbalancer gw Mac
+         * @return kubernetes external lb config builder
+         */
+        Builder loadBalancerGwMac(MacAddress loadBalancerGwMac);
+
+        /**
+         * Returns kubernetes external lb config builder with supplied global Ip range.
+         *
+         * @param globalIpRange global Ip range
+         * @return kubernetes external lb config builder
+         */
+        Builder globalIpRange(String globalIpRange);
+
+    }
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigAdminService.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigAdminService.java
new file mode 100644
index 0000000..36e163f
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigAdminService.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+/**
+ * Service for administering inventory of Kubernetes External Lb Configs.
+ */
+public interface KubernetesExternalLbConfigAdminService extends KubernetesExternalLbConfigService {
+
+    /**
+     * Creates a new kubernetes external lb config.
+     *
+     * @param lbConfig kubernetes external lb config
+     */
+    void createKubernetesExternalLbConfig(KubernetesExternalLbConfig lbConfig);
+
+    /**
+     * Updates a new kubernetes external lb config.
+     *
+     * @param lbConfig kubernetes external lb config
+     */
+    void updateKubernetesExternalLbConfig(KubernetesExternalLbConfig lbConfig);
+
+    /**
+     * Removes a new kubernetes external lb config.
+     *
+     * @param configName kubernetes external lb config
+     */
+    void removeKubernetesExternalLbConfig(String configName);
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigEvent.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigEvent.java
new file mode 100644
index 0000000..c42ed31
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigEvent.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onosproject.event.AbstractEvent;
+
+public class KubernetesExternalLbConfigEvent
+        extends AbstractEvent<KubernetesExternalLbConfigEvent.Type, KubernetesExternalLbConfig> {
+
+    public KubernetesExternalLbConfigEvent(Type type, KubernetesExternalLbConfig subject) {
+        super(type, subject);
+    }
+
+    /**
+     * Kubernetes external lb config events.
+     */
+    public enum Type {
+        /**
+         * Signifies that a new config is created.
+         */
+        KUBERNETES_EXTERNAL_LB_CONFIG_CREATED,
+
+        /**
+         * Signifies that a new config is updated.
+         */
+        KUBERNETES_EXTERNAL_LB_CONFIG_UPDATED,
+
+        /**
+         * Signifies that a new config is removed.
+         */
+        KUBERNETES_EXTERNAL_LB_CONFIG_REMOVED
+    }
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigListener.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigListener.java
new file mode 100644
index 0000000..a91d048
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigListener.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onosproject.event.EventListener;
+
+/**
+ * Listener for kubernetes external lb config event.
+ */
+public interface KubernetesExternalLbConfigListener extends EventListener<KubernetesExternalLbConfigEvent> {
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigService.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigService.java
new file mode 100644
index 0000000..32e07e5
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigService.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onosproject.event.ListenerService;
+
+import java.util.Set;
+
+/**
+ * Service for administering the inventory of kubernetes external lb configs.
+ */
+public interface KubernetesExternalLbConfigService
+        extends ListenerService<KubernetesExternalLbConfigEvent, KubernetesExternalLbConfigListener> {
+    String APP_ID = "org.onosproject.kubevirtnode";
+
+    /**
+     * Returns the kubernetes external lb config with the given config name.
+     *
+     * @param configName config name
+     * @return kubernetes external lb config
+     */
+    KubernetesExternalLbConfig lbConfig(String configName);
+
+    /**
+     * Returns all kubernetes external lb configs.
+     *
+     * @return set of kubernetes external lb configs
+     */
+    Set<KubernetesExternalLbConfig> lbConfigs();
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStore.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStore.java
new file mode 100644
index 0000000..9a1e366
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStore.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onosproject.store.Store;
+
+import java.util.Set;
+
+/**
+ * Manages inventory of kubernetes external lb config states; not intended for direct use.
+ */
+public interface KubernetesExternalLbConfigStore
+        extends Store<KubernetesExternalLbConfigEvent, KubernetesExternalLbConfigStoreDelegate> {
+
+    /**
+     * Creates a new kubernetes external lb config.
+     *
+     * @param lbConfig kubernetes external lb config
+     */
+    void createExternalLbConfig(KubernetesExternalLbConfig lbConfig);
+
+    /**
+     * Updates a new kubernetes external lb config.
+     *
+     * @param lbConfig kubernetes external lb config
+     */
+    void updateExternalLbConfig(KubernetesExternalLbConfig lbConfig);
+
+    /**
+     * Removes a new kubernetes external lb config.
+     *
+     * @param configName kubernetes external lb config
+     * @return removed kubernetes external lb config
+     */
+    KubernetesExternalLbConfig removeExternalLbConfig(String configName);
+
+    /**
+     * Returns the kubernetes external lb config with the given config name.
+     *
+     * @param configName config name
+     * @return kubernetes external lb config
+     */
+    KubernetesExternalLbConfig externalLbConfig(String configName);
+
+    /**
+     * Returns all kubernetes external lb configs.
+     *
+     * @return set of kubernetes external lb configs
+     */
+    Set<KubernetesExternalLbConfig> externalLbConfigs();
+
+    /**
+     * Removes all kubernetes external lb configs.
+     */
+    void clear();
+
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStoreDelegate.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStoreDelegate.java
new file mode 100644
index 0000000..12e5e11
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbConfigStoreDelegate.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onosproject.store.StoreDelegate;
+
+/**
+ * Kubernetes external lb config store delegate abstraction.
+ */
+public interface KubernetesExternalLbConfigStoreDelegate extends StoreDelegate<KubernetesExternalLbConfigEvent> {
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbInterface.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbInterface.java
new file mode 100644
index 0000000..df9081f
--- /dev/null
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubernetesExternalLbInterface.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2022-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.kubevirtnode.api;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+
+/**
+ * Representation of a Kubernetes external load balancer interface for kubevirt node.
+ */
+public interface KubernetesExternalLbInterface {
+
+    /**
+     *  Returns the name of the elb bridge.
+     *  Using this bridge, TEG internally communicates with data IP's in worker nodes.
+     *
+     * @return gateway bridge name
+     */
+    String externalLbBridgeName();
+
+    /**
+     *  Returns the internal Ip Address of TEG for kubernetes external lb purpose.
+     *
+     * @return elb ip address
+     */
+    IpAddress externalLbIp();
+
+    /**
+     *  Returns the gateway IP of the elb IP.
+     *
+     * @return elb gw ip address
+     */
+    IpAddress externalLbGwIp();
+
+    /**
+     *  Returns the mac address of the elb gw.
+     *
+     * @return elb gw mac address
+     */
+    MacAddress externalLbGwMac();
+
+
+    interface Builder {
+
+        /**
+         * Builds an immutable kubernetes external load balancer interface instance.
+         *
+         * @return  external load balancer interface instance
+         */
+        KubernetesExternalLbInterface build();
+
+        /**
+         * Returns kubernetes external load balancer interface builder with supplied elb bridge name.
+         *
+         * @param elbBridgeName elb bridge name
+         * @return kubernetes external load balancer interface builder
+         */
+        Builder externalLbBridgeName(String elbBridgeName);
+
+        /**
+         * Returns kubernetes external load balancer interface builder with supplied supplied elb Ip address.
+         *
+         * @param elbIp elb ip address
+         * @return kubernetes external load balancer interface builder
+         */
+        Builder externalLbIp(IpAddress elbIp);
+
+        /**
+         * Returns kubernetes external load balancer interface builder with supplied supplied elb gw Ip address.
+         *
+         * @param elbGwIp elb gw ip address
+         * @return kubernetes external load balancer interface builder
+         */
+        Builder externallbGwIp(IpAddress elbGwIp);
+
+        /**
+         * Returns kubernetes external load balancer interface builder with supplied supplied elb gw MAC address.
+         *
+         * @param elbGwMac elb gw mac address
+         * @return kubernetes external load balancer interface builder
+         */
+        Builder externalLbGwMac(MacAddress elbGwMac);
+    }
+}
diff --git a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubevirtNode.java b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubevirtNode.java
index 0015105..502784d 100644
--- a/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubevirtNode.java
+++ b/apps/kubevirt-node/api/src/main/java/org/onosproject/kubevirtnode/api/KubevirtNode.java
@@ -16,7 +16,6 @@
 package org.onosproject.kubevirtnode.api;
 
 import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.PortNumber;
 
@@ -190,34 +189,11 @@
     String gatewayBridgeName();
 
     /**
-     *  Returns the name of the elb bridge.
-     *  Using this bridge, TEG internally communicates with data IP's in worker nodes.
+     *  Returns the kubernetesExternalLbInterface.
      *
-     * @return gateway bridge name
+     * @return kubernetesExternalLbInterface
      */
-    String elbBridgeName();
-
-    /**
-     *  Returns the internal Ip Address of TEG for kubernetes external lb purpose.
-     *
-     * @return elb ip address
-     */
-    IpAddress elbIp();
-
-    /**
-     *  Returns the gateway IP of the elb IP.
-     *
-     * @return elb gw ip address
-     */
-    IpAddress elbGwIp();
-
-    /**
-     *  Returns the mac address of the elb gw.
-     *
-     * @return elb gw mac address
-     */
-    MacAddress elbGwMac();
-
+    KubernetesExternalLbInterface kubernetesExternalLbInterface();
 
     /**
      * Builder of new node entity.
@@ -310,36 +286,13 @@
          */
         KubevirtNode.Builder gatewayBridgeName(String gatewayBridgeName);
 
-        /**
-         * Returns kubevirt node builder with supplied elb bridge name.
-         *
-         * @param elbBridgeName elb bridge name
-         * @return kubevirt node builder
-         */
-        KubevirtNode.Builder elbBridgeName(String elbBridgeName);
 
         /**
-         * Returns kubevirt node builder with supplied supplied elb Ip address.
+         * Returns kubevirt node builder with supplied supplied kubernetesExternalLbInterface.
          *
-         * @param elbIp elb ip address
+         * @param kubernetesExternalLbInterface kubernetesExternalLbInterface
          * @return kubevirt node builder
          */
-        KubevirtNode.Builder elbIp(IpAddress elbIp);
-
-        /**
-         * Returns kubevirt node builder with supplied supplied elb gw Ip address.
-         *
-         * @param elbGwIp elb gw ip address
-         * @return kubevirt node builder
-         */
-        KubevirtNode.Builder elbGwIp(IpAddress elbGwIp);
-
-        /**
-         * Returns kubevirt node builder with supplied supplied elb gw MAC address.
-         *
-         * @param elbGwMac elb gw mac address
-         * @return kubevirt node builder
-         */
-        KubevirtNode.Builder elbGwMac(MacAddress elbGwMac);
+        KubevirtNode.Builder kubernetesExternalLbInterface(KubernetesExternalLbInterface kubernetesExternalLbInterface);
     }
 }
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubernetesExternalLbConfigCommand.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubernetesExternalLbConfigCommand.java
new file mode 100644
index 0000000..6eeb220
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubernetesExternalLbConfigCommand.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2022-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.kubevirtnode.cli;
+
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang.StringUtils;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigService;
+
+import static org.onosproject.kubevirtnode.api.Constants.CLI_IP_ADDRESSES_LENGTH;
+import static org.onosproject.kubevirtnode.api.Constants.CLI_IP_ADDRESS_LENGTH;
+import static org.onosproject.kubevirtnode.api.Constants.CLI_MAC_ADDRESS_LENGTH;
+import static org.onosproject.kubevirtnode.api.Constants.CLI_MARGIN_LENGTH;
+import static org.onosproject.kubevirtnode.api.Constants.CLI_NAME_LENGTH;
+import static org.onosproject.kubevirtnode.util.KubevirtNodeUtil.genFormatString;
+
+/**
+ * Lists all Kubernetes External LB config registered to the service.
+ */
+@Service
+@Command(scope = "onos", name = "kubernetes-lb-configs",
+        description = "Lists all Kubernetes External LB config registered to the service")
+public class KubernetesExternalLbConfigCommand extends AbstractShellCommand {
+
+    private static final String KUBE_VIP = "kubevip";
+
+    @Override
+    protected void doExecute() throws Exception {
+        KubernetesExternalLbConfigService service = get(KubernetesExternalLbConfigService.class);
+
+        String format = genFormatString(ImmutableList.of(CLI_NAME_LENGTH,
+                org.onosproject.kubevirtnode.api.Constants.CLI_IP_ADDRESS_LENGTH,
+                CLI_MAC_ADDRESS_LENGTH, CLI_IP_ADDRESSES_LENGTH));
+
+        KubernetesExternalLbConfig lbConfig = service.lbConfig(KUBE_VIP);
+
+        if (lbConfig == null) {
+            print("LB config not found!");
+        } else {
+            print(format, "ConfigName", "Gateway IP", "Gateway MAC", "Global-Range");
+
+            String configName = lbConfig.configName();
+            IpAddress gatewayIp = lbConfig.loadBalancerGwIp();
+            String gatewayMac = lbConfig.loadBalancerGwMac() == null ? "N/A" : lbConfig.loadBalancerGwMac().toString();
+            String globalRange = lbConfig.globalIpRange() == null ? "N/A" : lbConfig.globalIpRange();
+
+            print(format, StringUtils.substring(configName, 0,
+                    CLI_NAME_LENGTH - CLI_MARGIN_LENGTH),
+                    StringUtils.substring(gatewayIp.toString(), 0,
+                           CLI_IP_ADDRESS_LENGTH - CLI_MARGIN_LENGTH),
+                    StringUtils.substring(gatewayMac, 0,
+                            CLI_MAC_ADDRESS_LENGTH - CLI_MARGIN_LENGTH),
+                    StringUtils.substring(globalRange, 0,
+                            CLI_IP_ADDRESSES_LENGTH - CLI_MARGIN_LENGTH)
+                    );
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubevirtShowNodeCommand.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubevirtShowNodeCommand.java
index 5927530..39a18f0 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubevirtShowNodeCommand.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/cli/KubevirtShowNodeCommand.java
@@ -67,7 +67,7 @@
     }
 
     private void printNode(KubevirtNode node) {
-        print("node: %s", node.toString());
+        print("Node: %s", node.toString());
         print("Name: %s", node.hostname());
         print("  Type: %s", node.type());
         print("  State: %s", node.state());
@@ -88,11 +88,11 @@
             print("  GatewayBridgeName: %s", node.gatewayBridgeName());
         }
 
-        if (node.elbBridgeName() != null && node.elbIp() != null) {
-            print("  ElbBridgeName: %s", node.elbBridgeName());
-            print("  ElbIp: %s", node.elbIp().toString());
-            print("  ElbGwIp: %s", node.elbGwIp().toString());
-            print("  ElbGwMac: %s", node.elbGwMac().toString());
+        if (node.kubernetesExternalLbInterface() != null) {
+            print("  ElbBridgeName: %s", node.kubernetesExternalLbInterface().externalLbBridgeName());
+            print("  ElbIp: %s", node.kubernetesExternalLbInterface().externalLbIp().toString());
+            print("  ElbGwIp: %s", node.kubernetesExternalLbInterface().externalLbGwIp().toString());
+            print("  ElbGwMac: %s", node.kubernetesExternalLbInterface().externalLbGwMac().toString());
         }
     }
 
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbInterfaceCodec.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbInterfaceCodec.java
new file mode 100644
index 0000000..cdd4402
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbInterfaceCodec.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2022-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.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbInterface;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
+import org.slf4j.Logger;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.onlab.util.Tools.nullIsIllegal;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Kubernetes external load balancer interface codec used for serializing and de-serializing JSON string.
+ */
+public class KubernetesExternalLbInterfaceCodec extends JsonCodec<KubernetesExternalLbInterface> {
+    private final Logger log = getLogger(getClass());
+
+    private static final String ELB_BRIDGE_NAME = "externalLbBridgeName";
+    private static final String ELB_IP = "externalLbIp";
+    private static final String ELB_GW_IP = "externalLbGwIp";
+    private static final String ELB_GW_MAC = "externalLbGwMac";
+
+    private static final String MISSING_MESSAGE = " is required in KubernetesExternalLbInterfaceCodec";
+
+    @Override
+    public ObjectNode encode(KubernetesExternalLbInterface externalLbInterface, CodecContext context) {
+        checkNotNull(externalLbInterface, "checkNotNull cannot be null");
+
+        ObjectNode result = context.mapper().createObjectNode()
+                .put(ELB_BRIDGE_NAME, externalLbInterface.externalLbBridgeName())
+                .put(ELB_IP, externalLbInterface.externalLbIp().toString())
+                .put(ELB_GW_IP, externalLbInterface.externalLbGwIp().toString())
+                .put(ELB_GW_MAC, externalLbInterface.externalLbGwMac().toString());
+
+        return result;
+    }
+
+    @Override
+    public KubernetesExternalLbInterface decode(ObjectNode json, CodecContext context) {
+        if (json == null || !json.isObject()) {
+            return null;
+        }
+
+        String elbBridgeName = nullIsIllegal(json.get(ELB_BRIDGE_NAME).asText(),
+                ELB_BRIDGE_NAME + MISSING_MESSAGE);
+
+        String elbIp = nullIsIllegal(json.get(ELB_IP).asText(),
+                ELB_IP + MISSING_MESSAGE);
+
+        String elbGwIp = nullIsIllegal(json.get(ELB_GW_IP).asText(),
+                ELB_GW_IP + MISSING_MESSAGE);
+
+        String elbGwMac = nullIsIllegal(json.get(ELB_GW_MAC).asText(),
+                ELB_GW_MAC + MISSING_MESSAGE);
+
+        KubernetesExternalLbInterface externalLbInterface = DefaultKubernetesExternalLbInterface.builder()
+                .externalLbBridgeName(elbBridgeName)
+                .externallbGwIp(IpAddress.valueOf(elbGwIp))
+                .externalLbIp(IpAddress.valueOf(elbIp))
+                .externalLbGwMac(MacAddress.valueOf(elbGwMac))
+                .build();
+
+        return externalLbInterface;
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java
index ec6f6bf..5267c77 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java
@@ -19,10 +19,10 @@
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
 import org.onosproject.codec.CodecContext;
 import org.onosproject.codec.JsonCodec;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.KubevirtNode;
 import org.onosproject.kubevirtnode.api.KubevirtNodeState;
 import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
@@ -53,12 +53,9 @@
     private static final String STATE = "state";
     private static final String PHYSICAL_INTERFACES = "phyIntfs";
     private static final String GATEWAY_BRIDGE_NAME = "gatewayBridgeName";
-    private static final String ELB_BRIDGE_NAME = "elbBridgeName";
-    private static final String ELB_IP = "elbIp";
-    private static final String ELB_GW_IP = "elbGwIp";
-    private static final String ELB_GW_MAC = "elbGwMac";
+    private static final String KUBERNETES_EXTERNAL_LB_INTERFACE = "kubernetesExternalLbInterface";
 
-    private static final String MISSING_MESSAGE = " is required in OpenstackNode";
+    private static final String MISSING_MESSAGE = " is required in KubevirtNode";
 
     @Override
     public ObjectNode encode(KubevirtNode node, CodecContext context) {
@@ -101,21 +98,11 @@
             result.put(GATEWAY_BRIDGE_NAME, node.gatewayBridgeName());
         }
 
-        //serialize elb bridge and ip address if exist
-        if (node.elbBridgeName() != null) {
-            result.put(ELB_BRIDGE_NAME, node.elbBridgeName());
-        }
-
-        if (node.elbIp() != null) {
-            result.put(ELB_IP, node.elbIp().toString());
-        }
-
-        if (node.elbGwIp() != null) {
-            result.put(ELB_GW_IP, node.elbGwIp().toString());
-        }
-
-        if (node.elbGwMac() != null) {
-            result.put(ELB_GW_MAC, node.elbGwMac().toString());
+        // serialize kubernetex external load balancer interface if exist
+        if (node.kubernetesExternalLbInterface() != null) {
+            ObjectNode elbIntfJson = context.codec(KubernetesExternalLbInterface.class)
+                    .encode(node.kubernetesExternalLbInterface(), context);
+            result.put(KUBERNETES_EXTERNAL_LB_INTERFACE, elbIntfJson.toString());
         }
 
         return result;
@@ -173,24 +160,16 @@
             nodeBuilder.gatewayBridgeName(externalBridgeJson.asText());
         }
 
-        JsonNode elbBridgeJson = json.get(ELB_BRIDGE_NAME);
-        if (elbBridgeJson != null) {
-            nodeBuilder.elbBridgeName(elbBridgeJson.asText());
-        }
+        JsonNode elbIntfJson = json.get(KUBERNETES_EXTERNAL_LB_INTERFACE);
 
-        JsonNode elbIpJson = json.get(ELB_IP);
-        if (elbIpJson != null) {
-            nodeBuilder.elbIp(IpAddress.valueOf(elbIpJson.asText()));
-        }
+        if (elbIntfJson != null) {
+            final JsonCodec<KubernetesExternalLbInterface>
+                    kubernetesExternalLbInterfaceCodecJsonCodec = context.codec(KubernetesExternalLbInterface.class);
+            ObjectNode elbIntfObjNode = elbIntfJson.deepCopy();
 
-        JsonNode elbGwIpJson = json.get(ELB_GW_IP);
-        if (elbIpJson != null) {
-            nodeBuilder.elbGwIp(IpAddress.valueOf(elbGwIpJson.asText()));
-        }
+            nodeBuilder.kubernetesExternalLbInterface(
+                    kubernetesExternalLbInterfaceCodecJsonCodec.decode(elbIntfObjNode, context));
 
-        JsonNode elbGwMacJson = json.get(ELB_GW_MAC);
-        if (elbIpJson != null) {
-            nodeBuilder.elbGwMac(MacAddress.valueOf(elbGwMacJson.asText()));
         }
 
         log.trace("node is {}", nodeBuilder.build());
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubernetesExternalLbConfigStore.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubernetesExternalLbConfigStore.java
new file mode 100644
index 0000000..16a816e
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubernetesExternalLbConfigStore.java
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2022-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.kubevirtnode.impl;
+
+import com.google.common.collect.ImmutableSet;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.util.KryoNamespace;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigEvent;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigStore;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigStoreDelegate;
+import org.onosproject.store.AbstractStore;
+import org.onosproject.store.serializers.KryoNamespaces;
+import org.onosproject.store.service.ConsistentMap;
+import org.onosproject.store.service.MapEvent;
+import org.onosproject.store.service.MapEventListener;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.StorageService;
+import org.onosproject.store.service.Versioned;
+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.Collection;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
+import static org.onlab.util.Tools.groupedThreads;
+import static org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigEvent.Type
+        .KUBERNETES_EXTERNAL_LB_CONFIG_CREATED;
+import static org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigEvent.Type
+        .KUBERNETES_EXTERNAL_LB_CONFIG_REMOVED;
+import static org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigEvent.Type
+        .KUBERNETES_EXTERNAL_LB_CONFIG_UPDATED;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Implementation of kubernetes external lb config store using consistent map.
+ */
+@Component(immediate = true, service = KubernetesExternalLbConfigStore.class)
+public class DistributedKubernetesExternalLbConfigStore
+    extends AbstractStore<KubernetesExternalLbConfigEvent, KubernetesExternalLbConfigStoreDelegate>
+    implements KubernetesExternalLbConfigStore {
+
+    private final Logger log = getLogger(getClass());
+
+    private static final String ERR_NOT_FOUND = " does not exist";
+    private static final String ERR_DUPLICATE = " already exists";
+    private static final String APP_ID = "org.onosproject.kubevirtnode";
+
+    private static final KryoNamespace
+            SERIALIZER_KUBERNETES_EXTERNAL_LB_CONFIG = KryoNamespace.newBuilder()
+            .register(KryoNamespaces.API)
+            .register(KubernetesExternalLbConfig.class)
+            .register(DefaultKubernetesExternalLbConfig.class)
+            .register(IpAddress.class)
+            .register(MacAddress.class)
+            .register(Collection.class)
+            .build();
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected StorageService storageService;
+
+    private final ExecutorService eventExecutor = newSingleThreadExecutor(
+            groupedThreads(this.getClass().getSimpleName(), "event-handler", log));
+
+    private final MapEventListener<String, KubernetesExternalLbConfig> lbConfigMapEventListener =
+            new KubernetesExternalLbConfigMapListener();
+
+    private ConsistentMap<String, KubernetesExternalLbConfig> lbConfigStore;
+
+    @Activate
+    protected void activate() {
+        ApplicationId appId = coreService.registerApplication(APP_ID);
+        lbConfigStore = storageService.<String, KubernetesExternalLbConfig>consistentMapBuilder()
+                .withSerializer(Serializer.using(SERIALIZER_KUBERNETES_EXTERNAL_LB_CONFIG))
+                .withName("kubernetes-lbconfigstore")
+                .withApplicationId(appId)
+                .build();
+
+        lbConfigStore.addListener(lbConfigMapEventListener);
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        lbConfigStore.removeListener(lbConfigMapEventListener);
+        eventExecutor.shutdown();
+        log.info("Stopped");
+    }
+
+    @Override
+    public void createExternalLbConfig(KubernetesExternalLbConfig lbConfig) {
+        lbConfigStore.compute(lbConfig.configName(), (configName, existing) -> {
+            final String error = lbConfig.configName() + ERR_DUPLICATE;
+            checkArgument(existing == null, error);
+            return lbConfig;
+        });
+    }
+
+    @Override
+    public void updateExternalLbConfig(KubernetesExternalLbConfig lbConfig) {
+        lbConfigStore.compute(lbConfig.configName(), (configName, existing) -> {
+            final String error = lbConfig.configName() + ERR_NOT_FOUND;
+            checkArgument(existing != null, error);
+            return lbConfig;
+        });
+    }
+
+    @Override
+    public KubernetesExternalLbConfig removeExternalLbConfig(String configName) {
+
+        Versioned<KubernetesExternalLbConfig> lbConfig = lbConfigStore.remove(configName);
+
+        if (lbConfig == null) {
+            final String error = configName + ERR_NOT_FOUND;
+            throw new IllegalArgumentException(error);
+        }
+
+        return lbConfig.value();
+    }
+
+    @Override
+    public KubernetesExternalLbConfig externalLbConfig(String configName) {
+        return lbConfigStore.asJavaMap().get(configName);
+    }
+
+    @Override
+    public Set<KubernetesExternalLbConfig> externalLbConfigs() {
+
+        return ImmutableSet.copyOf(lbConfigStore.asJavaMap().values());
+    }
+
+    @Override
+    public void clear() {
+        lbConfigStore.clear();
+    }
+
+    private class KubernetesExternalLbConfigMapListener
+            implements MapEventListener<String, KubernetesExternalLbConfig> {
+
+        @Override
+        public void event(MapEvent<String, KubernetesExternalLbConfig> event) {
+            switch (event.type()) {
+                case INSERT:
+                    eventExecutor.execute(() ->
+                            notifyDelegate(new KubernetesExternalLbConfigEvent(
+                                    KUBERNETES_EXTERNAL_LB_CONFIG_CREATED, event.newValue().value())));
+                    break;
+                case UPDATE:
+                    eventExecutor.execute(() ->
+                            notifyDelegate(new KubernetesExternalLbConfigEvent(
+                                    KUBERNETES_EXTERNAL_LB_CONFIG_UPDATED, event.newValue().value())));
+                    break;
+                case REMOVE:
+                    eventExecutor.execute(() ->
+                            notifyDelegate(new KubernetesExternalLbConfigEvent(
+                                    KUBERNETES_EXTERNAL_LB_CONFIG_REMOVED, event.oldValue().value())));
+                    break;
+                default:
+                    //do nothing
+                    break;
+            }
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubevirtNodeStore.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubevirtNodeStore.java
index d0bde71..47a28e1 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubevirtNodeStore.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/DistributedKubevirtNodeStore.java
@@ -19,8 +19,10 @@
 import org.onlab.util.KryoNamespace;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.KubevirtNode;
 import org.onosproject.kubevirtnode.api.KubevirtNodeEvent;
 import org.onosproject.kubevirtnode.api.KubevirtNodeState;
@@ -77,6 +79,8 @@
             .register(DefaultKubevirtNode.class)
             .register(KubevirtPhyInterface.class)
             .register(DefaultKubevirtPhyInterface.class)
+            .register(KubernetesExternalLbInterface.class)
+            .register(DefaultKubernetesExternalLbInterface.class)
             .register(KubevirtNode.Type.class)
             .register(KubevirtNodeState.class)
             .register(Collection.class)
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesConfigMapWatcher.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesConfigMapWatcher.java
new file mode 100644
index 0000000..bac5e03
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesConfigMapWatcher.java
@@ -0,0 +1,271 @@
+/*
+ * Copyright 2022-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.kubevirtnode.impl;
+
+import io.fabric8.kubernetes.api.model.ConfigMap;
+import io.fabric8.kubernetes.client.KubernetesClient;
+import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+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.kubevirtnode.api.DefaultKubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigAdminService;
+import org.onosproject.kubevirtnode.api.KubevirtApiConfig;
+import org.onosproject.kubevirtnode.api.KubevirtApiConfigEvent;
+import org.onosproject.kubevirtnode.api.KubevirtApiConfigListener;
+import org.onosproject.kubevirtnode.api.KubevirtApiConfigService;
+import org.onosproject.kubevirtnode.api.KubevirtNodeService;
+import org.onosproject.mastership.MastershipService;
+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.kubevirtnode.api.KubevirtNodeService.APP_ID;
+import static org.onosproject.kubevirtnode.util.KubevirtNodeUtil.k8sClient;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Kubernetes configmap watcher used for external loadbalancing among PODs.
+ */
+@Component(immediate = true)
+public class KubernetesConfigMapWatcher {
+    private final Logger log = getLogger(getClass());
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected MastershipService mastershipService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected ClusterService clusterService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected LeadershipService leadershipService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected KubevirtApiConfigService configService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected KubernetesExternalLbConfigAdminService adminService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected KubevirtNodeService nodeService;
+
+    private static final String KUBE_DASH_VIP = "kube-vip";
+    private static final String KUBE_VIP = "kubevip";
+    private static final String LOADBALANCER_IP = "loadBalancerIP";
+    private static final String TYPE_LOADBALANCER = "LoadBalancer";
+    private static final String KUBE_SYSTEM = "kube-system";
+    private static final String GATEWAY_IP = "gateway-ip";
+    private static final String GATEWAY_MAC = "gateway-mac";
+    private static final String RANGE_GLOBAL = "range-global";
+
+    private ApplicationId appId;
+    private NodeId localNodeId;
+
+    private final ExecutorService eventExecutor = newSingleThreadExecutor(
+            groupedThreads(this.getClass().getSimpleName(), "event-handler"));
+
+    private final InternalKubevirtApiConfigListener
+            configListener = new InternalKubevirtApiConfigListener();
+
+    private final InternalKubernetesConfigMapWatcher
+            mapWatcher = new InternalKubernetesConfigMapWatcher();
+
+    @Activate
+    protected void activate() {
+        appId = coreService.registerApplication(APP_ID);
+        localNodeId = clusterService.getLocalNode().id();
+        leadershipService.runForLeadership(appId.name());
+        configService.addListener(configListener);
+
+        log.info("Started");
+    }
+
+
+    @Deactivate
+    protected void deactivate() {
+        configService.removeListener(configListener);
+        leadershipService.withdraw(appId.name());
+        eventExecutor.shutdown();
+
+        log.info("Stopped");
+    }
+
+
+    private void instantiateWatcher() {
+        KubevirtApiConfig config = configService.apiConfig();
+        if (config == null) {
+            return;
+        }
+        KubernetesClient client = k8sClient(config);
+
+        if (client != null) {
+            client.configMaps().inNamespace(KUBE_SYSTEM).withName(KUBE_VIP).watch(mapWatcher);
+        }
+    }
+
+    private class InternalKubernetesConfigMapWatcher implements Watcher<ConfigMap> {
+
+        private boolean isMaster() {
+            return Objects.equals(localNodeId, leadershipService.getLeader(appId.name()));
+        }
+
+
+        @Override
+        public void eventReceived(Action action, ConfigMap configMap) {
+            switch (action) {
+                case ADDED:
+                    log.info("ConfigMap event ADDED received");
+                    eventExecutor.execute(() -> processAddOrMod(configMap));
+                    break;
+                case MODIFIED:
+                    log.info("ConfigMap event MODIFIED received");
+                    eventExecutor.execute(() -> processAddOrMod(configMap));
+                    break;
+                case DELETED:
+                    log.info("ConfigMap event DELETED received");
+                    eventExecutor.execute(() -> processDeletion(configMap));
+                    break;
+                case ERROR:
+                    log.warn("Failures processing pod manipulation.");
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        @Override
+        public void onClose(WatcherException e) {
+            // due to the bugs in fabric8, pod watcher might be closed,
+            // we will re-instantiate the pod watcher in this case
+            // FIXME: https://github.com/fabric8io/kubernetes-client/issues/2135
+            log.warn("Configmap watcher OnClose, re-instantiate the POD watcher...");
+            instantiateWatcher();
+        }
+
+        private void processAddOrMod(ConfigMap configMap) {
+            if (configMap == null || !isMaster()) {
+                return;
+            }
+
+            String configName = configMap.getMetadata().getName();
+            if (!configName.equals(KUBE_VIP)) {
+                return;
+            }
+
+            KubernetesExternalLbConfig lbConfig = parseKubernetesExternalLbConfig(configMap, configName);
+
+            if (lbConfig == null) {
+                return;
+            }
+
+            log.info("Kubernetes external LB config inserted/updated {}", lbConfig);
+
+            if (adminService.lbConfig(configName) == null) {
+                adminService.createKubernetesExternalLbConfig(lbConfig);
+            } else {
+                adminService.updateKubernetesExternalLbConfig(lbConfig);
+            }
+        }
+
+        private void processDeletion(ConfigMap configMap) {
+            if (configMap == null || !isMaster()) {
+                return;
+            }
+
+            String configName = configMap.getMetadata().getName();
+            if (!configName.equals(KUBE_VIP)) {
+                return;
+            }
+
+            KubernetesExternalLbConfig lbConfig = adminService.lbConfig(configName);
+
+            if (lbConfig == null) {
+                return;
+            }
+
+            adminService.removeKubernetesExternalLbConfig(configName);
+        }
+
+        private KubernetesExternalLbConfig parseKubernetesExternalLbConfig(ConfigMap configMap, String configName) {
+            if (configMap.getData().get(GATEWAY_IP) == null || configMap.getData().get(RANGE_GLOBAL) == null) {
+                return null;
+            }
+
+            KubernetesExternalLbConfig.Builder lbConfigBuilder = DefaultKubernetesExternalLbConfig.builder();
+
+            try {
+                lbConfigBuilder.configName(configName)
+                        .loadBalancerGwIp(IpAddress.valueOf(configMap.getData().get(GATEWAY_IP)))
+                        .globalIpRange(configMap.getData().get(RANGE_GLOBAL));
+
+                if (configMap.getData().containsKey(GATEWAY_MAC)) {
+                    lbConfigBuilder.loadBalancerGwMac(MacAddress.valueOf(configMap.getData().get(GATEWAY_MAC)));
+                }
+
+            } catch (IllegalArgumentException e) {
+                log.error("Exception occurred because of {}", e.toString());
+            }
+
+            return lbConfigBuilder.build();
+        }
+    }
+
+    private class InternalKubevirtApiConfigListener implements KubevirtApiConfigListener {
+
+        private boolean isRelevantHelper() {
+            return Objects.equals(localNodeId, leadershipService.getLeader(appId.name()));
+        }
+
+        @Override
+        public void event(KubevirtApiConfigEvent event) {
+
+            switch (event.type()) {
+                case KUBEVIRT_API_CONFIG_UPDATED:
+                    eventExecutor.execute(this::processConfigUpdate);
+                    break;
+                case KUBEVIRT_API_CONFIG_CREATED:
+                case KUBEVIRT_API_CONFIG_REMOVED:
+                default:
+                    // do nothing
+                    break;
+            }
+        }
+
+        private void processConfigUpdate() {
+            if (!isRelevantHelper()) {
+                return;
+            }
+            instantiateWatcher();
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesExternalLbConfigManager.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesExternalLbConfigManager.java
new file mode 100644
index 0000000..0562ee9
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubernetesExternalLbConfigManager.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2022-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.kubevirtnode.impl;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableSet;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.event.ListenerRegistry;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfig;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigAdminService;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigEvent;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigListener;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigService;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigStore;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbConfigStoreDelegate;
+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.Set;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Provides implementation of administrating and interfacing kubernetes external lb config.
+ */
+@Component(
+        immediate = true,
+        service = {KubernetesExternalLbConfigAdminService.class, KubernetesExternalLbConfigService.class}
+)
+public class KubernetesExternalLbConfigManager
+        extends ListenerRegistry<KubernetesExternalLbConfigEvent, KubernetesExternalLbConfigListener>
+        implements KubernetesExternalLbConfigAdminService, KubernetesExternalLbConfigService {
+    protected final Logger log = getLogger(getClass());
+
+    private static final String MSG_LOAD_BALANCER_CONFIG = "Kubernetes external lb config %s %s";
+    private static final String MSG_CREATED = "created";
+    private static final String MSG_UPDATED = "updated";
+    private static final String MSG_REMOVED = "removed";
+
+    private static final String ERR_NULL_LOAD_BALANCER_CONFIG = "Kubernetes external lb config cannot be null";
+    private static final String ERR_NULL_LOAD_BALANCER_CONFIG_NAME
+            = "Kubernetes external lb config name cannot be null";
+    private static final String ERR_IN_USE = " still in use";
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CoreService coreService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected KubernetesExternalLbConfigStore lbConfigStore;
+
+    private final InternalKubernetesExternalLbConfigStorageDelegate delegate =
+            new InternalKubernetesExternalLbConfigStorageDelegate();
+
+    private ApplicationId appId;
+
+
+    @Activate
+    protected void activate() {
+        appId = coreService.registerApplication(APP_ID);
+
+        lbConfigStore.setDelegate(delegate);
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        lbConfigStore.unsetDelegate(delegate);
+        log.info("Stopped");
+    }
+
+
+    @Override
+    public void createKubernetesExternalLbConfig(KubernetesExternalLbConfig lbConfig) {
+        checkNotNull(lbConfig, ERR_NULL_LOAD_BALANCER_CONFIG);
+        checkArgument(!Strings.isNullOrEmpty(lbConfig.configName()), ERR_NULL_LOAD_BALANCER_CONFIG_NAME);
+
+        lbConfigStore.createExternalLbConfig(lbConfig);
+        log.info(String.format(MSG_LOAD_BALANCER_CONFIG, lbConfig.configName(), MSG_CREATED));
+    }
+
+    @Override
+    public void updateKubernetesExternalLbConfig(KubernetesExternalLbConfig lbConfig) {
+        checkNotNull(lbConfig, ERR_NULL_LOAD_BALANCER_CONFIG);
+        checkArgument(!Strings.isNullOrEmpty(lbConfig.configName()), ERR_NULL_LOAD_BALANCER_CONFIG_NAME);
+
+        lbConfigStore.updateExternalLbConfig(lbConfig);
+        log.info(String.format(MSG_LOAD_BALANCER_CONFIG, lbConfig.configName(), MSG_UPDATED));
+    }
+
+    @Override
+    public void removeKubernetesExternalLbConfig(String configName) {
+
+        checkArgument(configName != null, ERR_NULL_LOAD_BALANCER_CONFIG_NAME);
+
+        synchronized (this) {
+            KubernetesExternalLbConfig lbConfig = lbConfigStore.removeExternalLbConfig(configName);
+
+            if (lbConfig != null) {
+                log.info(String.format(MSG_LOAD_BALANCER_CONFIG, lbConfig.configName(), MSG_REMOVED));
+            }
+        }
+    }
+
+    @Override
+    public KubernetesExternalLbConfig lbConfig(String configName) {
+        checkArgument(configName != null, ERR_NULL_LOAD_BALANCER_CONFIG_NAME);
+
+        return lbConfigStore.externalLbConfig(configName);
+    }
+
+    @Override
+    public Set<KubernetesExternalLbConfig> lbConfigs() {
+        return ImmutableSet.copyOf(lbConfigStore.externalLbConfigs());
+    }
+
+    private class InternalKubernetesExternalLbConfigStorageDelegate
+            implements KubernetesExternalLbConfigStoreDelegate {
+
+        @Override
+        public void notify(KubernetesExternalLbConfigEvent event) {
+            log.trace("send kubernetes external lb config event {}", event);
+            process(event);
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubevirtNodeWatcher.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubevirtNodeWatcher.java
index 5ff2856..3949d79 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubevirtNodeWatcher.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/impl/KubevirtNodeWatcher.java
@@ -186,7 +186,7 @@
             }
 
             KubevirtNode kubevirtNode = buildKubevirtNode(node);
-            log.info("buildKubevirtNode: {}", kubevirtNode.toString());
+            log.info("buildKubevirtNode: {}", kubevirtNode);
             if (kubevirtNode.type() == WORKER || kubevirtNode.type() == GATEWAY) {
                 if (!kubevirtNodeAdminService.hasNode(kubevirtNode.hostname())) {
                     kubevirtNodeAdminService.createNode(kubevirtNode);
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/util/KubevirtNodeUtil.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/util/KubevirtNodeUtil.java
index 2589be5..a5a5157 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/util/KubevirtNodeUtil.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/util/KubevirtNodeUtil.java
@@ -15,6 +15,8 @@
  */
 package org.onosproject.kubevirtnode.util;
 
+import com.eclipsesource.json.JsonArray;
+import com.eclipsesource.json.JsonObject;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -27,12 +29,12 @@
 import io.fabric8.kubernetes.client.DefaultKubernetesClient;
 import io.fabric8.kubernetes.client.KubernetesClient;
 import org.apache.commons.lang.StringUtils;
-import com.eclipsesource.json.JsonArray;
-import com.eclipsesource.json.JsonObject;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.KubevirtApiConfig;
 import org.onosproject.kubevirtnode.api.KubevirtNode;
 import org.onosproject.kubevirtnode.api.KubevirtNodeState;
@@ -85,11 +87,11 @@
     private static final String DATA_IP_KEY = SONA_PROJECT_DOMAIN + "/data-ip";
     private static final String GATEWAY_CONFIG_KEY = SONA_PROJECT_DOMAIN + "/gateway-config";
     private static final String GATEWAY_BRIDGE_NAME = "gatewayBridgeName";
-    private static final String ELB_CONFIG_KEY = SONA_PROJECT_DOMAIN + "/elb-config";
-    private static final String ELB_BRIDGE_NAME = "elbBridgeName";
-    private static final String ELB_IP_KEY = SONA_PROJECT_DOMAIN + "/elb-ip";
-    private static final String ELB_GW_IP_KEY = SONA_PROJECT_DOMAIN + "/elb-gw-ip";
-    private static final String ELB_GW_MAC_KEY = SONA_PROJECT_DOMAIN + "/elb-gw-mac";
+    private static final String EXTERNAL_LB_CONFIG_KEY = SONA_PROJECT_DOMAIN + "/externalLb-config";
+    private static final String EXTERNAL_LB_BRIDGE_NAME = "externalLbBridgeName";
+    private static final String EXTERNAL_LB_IP_KEY = SONA_PROJECT_DOMAIN + "/externalLb-ip";
+    private static final String EXTERNAL_LB_GATEWAY_IP_KEY = SONA_PROJECT_DOMAIN + "/externalLb-gateway-ip";
+    private static final String EXTERNAL_LB_GATEWAY_MAC_KEY = SONA_PROJECT_DOMAIN + "/externalLb-gateway-mac";
     private static final String NETWORK_KEY = "network";
     private static final String INTERFACE_KEY = "interface";
     private static final String PHYS_BRIDGE_ID = "physBridgeId";
@@ -393,15 +395,17 @@
         Set<KubevirtPhyInterface> phys = new HashSet<>();
         String gatewayBridgeName = null;
 
-        String elbConfig = annots.get(ELB_CONFIG_KEY);
-        String elbIpStr = annots.get(ELB_IP_KEY);
-        String elbGwIpStr = annots.get(ELB_GW_IP_KEY);
-        String elbGwMacStr = annots.get(ELB_GW_MAC_KEY);
+        String elbConfig = annots.get(EXTERNAL_LB_CONFIG_KEY);
+        String elbIpStr = annots.get(EXTERNAL_LB_IP_KEY);
+        String elbGwIpStr = annots.get(EXTERNAL_LB_GATEWAY_IP_KEY);
+        String elbGwMacStr = annots.get(EXTERNAL_LB_GATEWAY_MAC_KEY);
         String elbBridgeName = null;
         IpAddress elbIp = null;
         IpAddress elbGwIp = null;
         MacAddress elbGwMac = null;
 
+        KubernetesExternalLbInterface kubernetesExternalLbInterface = null;
+
         try {
             if (physnetConfig != null) {
                 JsonArray configJson = JsonArray.readFrom(physnetConfig);
@@ -443,15 +447,20 @@
                 if (elbConfig != null && elbIpStr != null && elbGwIpStr != null) {
                     JsonNode elbJsonNode = new ObjectMapper().readTree(elbConfig);
 
-                    elbBridgeName = elbJsonNode.get(ELB_BRIDGE_NAME).asText();
+                    elbBridgeName = elbJsonNode.get(EXTERNAL_LB_BRIDGE_NAME).asText();
                     elbIp = IpAddress.valueOf(elbIpStr);
                     elbGwIp = IpAddress.valueOf(elbGwIpStr);
-                }
 
-                if (elbGwMacStr != null) {
-                    elbGwMac = MacAddress.valueOf(elbGwMacStr);
-                } else {
-                    //TODO: add the logic that retrieves the MAC address of the elb gw ip.
+                    if (elbGwMacStr != null) {
+                        elbGwMac = MacAddress.valueOf(elbGwMacStr);
+                    }
+
+                    kubernetesExternalLbInterface = DefaultKubernetesExternalLbInterface.builder()
+                            .externalLbBridgeName(elbBridgeName)
+                            .externalLbIp(elbIp)
+                            .externallbGwIp(elbGwIp)
+                            .externalLbGwMac(elbGwMac)
+                            .build();
                 }
             }
         } catch (JsonProcessingException e) {
@@ -483,10 +492,7 @@
                 .state(KubevirtNodeState.ON_BOARDED)
                 .phyIntfs(phys)
                 .gatewayBridgeName(gatewayBridgeName)
-                .elbBridgeName(elbBridgeName)
-                .elbIp(elbIp)
-                .elbGwIp(elbGwIp)
-                .elbGwMac(elbGwMac)
+                .kubernetesExternalLbInterface(kubernetesExternalLbInterface)
                 .build();
     }
 
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java
index 55d740f..00a1007 100644
--- a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java
@@ -16,9 +16,11 @@
 package org.onosproject.kubevirtnode.web;
 
 import org.onosproject.codec.CodecService;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.KubevirtApiConfig;
 import org.onosproject.kubevirtnode.api.KubevirtNode;
 import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.kubevirtnode.codec.KubernetesExternalLbInterfaceCodec;
 import org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec;
 import org.onosproject.kubevirtnode.codec.KubevirtNodeCodec;
 import org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec;
@@ -47,6 +49,7 @@
         codecService.registerCodec(KubevirtNode.class, new KubevirtNodeCodec());
         codecService.registerCodec(KubevirtPhyInterface.class, new KubevirtPhyInterfaceCodec());
         codecService.registerCodec(KubevirtApiConfig.class, new KubevirtApiConfigCodec());
+        codecService.registerCodec(KubernetesExternalLbInterface.class, new KubernetesExternalLbInterfaceCodec());
 
         log.info("Started");
     }
@@ -56,6 +59,7 @@
         codecService.unregisterCodec(KubevirtNode.class);
         codecService.unregisterCodec(KubevirtPhyInterface.class);
         codecService.unregisterCodec(KubevirtApiConfig.class);
+        codecService.unregisterCodec(KubernetesExternalLbInterface.class);
 
         log.info("Stopped");
     }
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfCodecTest.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfCodecTest.java
new file mode 100644
index 0000000..6917c35
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfCodecTest.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2022-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.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.hamcrest.MatcherAssert;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.codec.impl.MockCodecContext;
+import org.onosproject.core.CoreService;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbInterface;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import static junit.framework.TestCase.assertEquals;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.onosproject.kubevirtnode.codec.KubernetesExternalLbIntfJsonMatcher.matchesKubernetesElbIntf;
+import static org.onosproject.net.NetTestTools.APP_ID;
+
+/**
+ * Unit tests for KubernetesExternalLbInterface codec.
+ */
+public class KubernetesExternalLbIntfCodecTest {
+    MockCodecContext context;
+
+    private static final String REST_APP_ID = "org.onosproject.rest";
+    JsonCodec<KubernetesExternalLbInterface> kubernetesElbIntfCodec;
+
+    final CoreService mockCoreService = createMock(CoreService.class);
+
+    @Before
+    public void setUp() {
+        context = new MockCodecContext();
+        kubernetesElbIntfCodec = new KubernetesExternalLbInterfaceCodec();
+
+        assertThat(kubernetesElbIntfCodec, notNullValue());
+
+        expect(mockCoreService.registerApplication(REST_APP_ID))
+                .andReturn(APP_ID).anyTimes();
+        replay(mockCoreService);
+        context.registerService(CoreService.class, mockCoreService);
+    }
+
+    /**
+     * Tests encoding.
+     */
+    @Test
+    public void testEncode() {
+        KubernetesExternalLbInterface externalLbInterface =
+                DefaultKubernetesExternalLbInterface.builder()
+                        .externalLbBridgeName("elbnetwork")
+                        .externalLbIp(IpAddress.valueOf("10.10.10.2"))
+                        .externallbGwIp(IpAddress.valueOf("10.10.10.1"))
+                        .externalLbGwMac(MacAddress.valueOf("AA:BB:CC:DD:EE:FF"))
+                        .build();
+
+        ObjectNode nodeJson = kubernetesElbIntfCodec.encode(externalLbInterface, context);
+        assertThat(nodeJson, matchesKubernetesElbIntf(externalLbInterface));
+    }
+
+    /**
+     * Tests decoding.
+     */
+    @Test
+    public void testDecode() throws IOException {
+        KubernetesExternalLbInterface externalLbInterface = getElbIntf("KubernetesExternalLbIntf.json");
+
+        assertEquals("elbnet", externalLbInterface.externalLbBridgeName());
+        assertEquals("10.10.10.2", externalLbInterface.externalLbIp().toString());
+        assertEquals("10.10.10.1", externalLbInterface.externalLbGwIp().toString());
+        assertEquals("AA:BB:CC:DD:EE:FF", externalLbInterface.externalLbGwMac().toString());
+    }
+
+    private KubernetesExternalLbInterface getElbIntf(String resourceName) throws IOException {
+        InputStream jsonStream = KubernetesExternalLbIntfCodecTest.class.getResourceAsStream(resourceName);
+        JsonNode json = context.mapper().readTree(jsonStream);
+        MatcherAssert.assertThat(json, notNullValue());
+
+        KubernetesExternalLbInterface externalLbInterface = kubernetesElbIntfCodec.decode(
+                (ObjectNode) json, context);
+        assertThat(externalLbInterface, notNullValue());
+
+        return externalLbInterface;
+    }
+
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfJsonMatcher.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfJsonMatcher.java
new file mode 100644
index 0000000..9744f62
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntfJsonMatcher.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2022-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.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeDiagnosingMatcher;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
+
+/**
+ * Hamcrest matcher for KubernetesExternalLbInterface.
+ */
+public final class KubernetesExternalLbIntfJsonMatcher extends TypeSafeDiagnosingMatcher<JsonNode> {
+
+    private final KubernetesExternalLbInterface externalLbInterface;
+
+    private static final String ELB_BRIDGE_NAME = "externalLbBridgeName";
+    private static final String ELB_IP = "externalLbIp";
+    private static final String ELB_GW_IP = "externalLbGwIp";
+    private static final String ELB_GW_MAC = "externalLbGwMac";
+
+    private KubernetesExternalLbIntfJsonMatcher(KubernetesExternalLbInterface externalLbInterface) {
+        this.externalLbInterface = externalLbInterface;
+    }
+
+    @Override
+    protected boolean matchesSafely(JsonNode jsonNode, Description description) {
+        // check externalLbBridgeName
+        String jsonElbBridgeName = jsonNode.get(ELB_BRIDGE_NAME).asText();
+        String elbBridgeName = externalLbInterface.externalLbBridgeName();
+        if (!jsonElbBridgeName.equals(elbBridgeName)) {
+            description.appendText("externalLbBridgeName was " + elbBridgeName);
+            return false;
+        }
+
+        // check externalLbIp
+        String jsonElbIp = jsonNode.get(ELB_IP).asText();
+        String elbIp = externalLbInterface.externalLbIp().toString();
+        if (!jsonElbIp.equals(elbIp)) {
+            description.appendText("externalLbIp was " + elbIp);
+            return false;
+        }
+
+        // check externalLbGwIp
+        String jsonElbGwIp = jsonNode.get(ELB_GW_IP).asText();
+        String elbGwIp = externalLbInterface.externalLbGwIp().toString();
+        if (!jsonElbGwIp.equals(elbGwIp)) {
+            description.appendText("externalLbGwIp was " + elbGwIp);
+            return false;
+        }
+
+        // check externalLbGwMac
+        String jsonElbGwMac = jsonNode.get(ELB_GW_MAC).asText();
+        String elbGwMac = externalLbInterface.externalLbGwMac().toString();
+        if (!jsonElbGwMac.equals(elbGwMac)) {
+            description.appendText("externalLbGwMac was " + elbGwMac);
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public void describeTo(Description description) {
+        description.appendText(externalLbInterface.toString());
+    }
+
+    /**
+     * Factory to allocate a kubernetes external lb interface matcher.
+     *
+     * @param externalLbInterface kubernetes external lb interface we are looking for
+     * @return matcher
+     */
+    public static KubernetesExternalLbIntfJsonMatcher matchesKubernetesElbIntf(
+            KubernetesExternalLbInterface externalLbInterface) {
+        return new KubernetesExternalLbIntfJsonMatcher(externalLbInterface);
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java
index 8f89152..e201554 100644
--- a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java
@@ -28,8 +28,10 @@
 import org.onosproject.codec.JsonCodec;
 import org.onosproject.codec.impl.CodecManager;
 import org.onosproject.core.CoreService;
+import org.onosproject.kubevirtnode.api.DefaultKubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
 import org.onosproject.kubevirtnode.api.DefaultKubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.KubernetesExternalLbInterface;
 import org.onosproject.kubevirtnode.api.KubevirtNode;
 import org.onosproject.kubevirtnode.api.KubevirtNodeState;
 import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
@@ -57,6 +59,7 @@
 
     JsonCodec<KubevirtNode> kubevirtNodeCodec;
     JsonCodec<KubevirtPhyInterface> kubevirtPhyInterfaceJsonCodec;
+    JsonCodec<KubernetesExternalLbInterface> kubernetesExternalLbInterfaceJsonCodec;
 
     final CoreService mockCoreService = createMock(CoreService.class);
     private static final String REST_APP_ID = "org.onosproject.rest";
@@ -70,9 +73,11 @@
         context = new MockCodecContext();
         kubevirtNodeCodec = new KubevirtNodeCodec();
         kubevirtPhyInterfaceJsonCodec = new KubevirtPhyInterfaceCodec();
+        kubernetesExternalLbInterfaceJsonCodec = new KubernetesExternalLbInterfaceCodec();
 
         assertThat(kubevirtNodeCodec, notNullValue());
         assertThat(kubevirtPhyInterfaceJsonCodec, notNullValue());
+        assertThat(kubernetesExternalLbInterfaceJsonCodec, notNullValue());
 
         expect(mockCoreService.registerApplication(REST_APP_ID))
                 .andReturn(APP_ID).anyTimes();
@@ -106,8 +111,6 @@
                 .tunBridge(DeviceId.deviceId("br-tun"))
                 .dataIp(IpAddress.valueOf("20.20.20.2"))
                 .phyIntfs(ImmutableList.of(phyIntf1, phyIntf2))
-                .elbBridgeName("elbnet")
-                .elbIp(IpAddress.valueOf("10.10.10.1"))
                 .build();
 
         ObjectNode nodeJson = kubevirtNodeCodec.encode(node, context);
@@ -157,6 +160,15 @@
      */
     @Test
     public void testKubevirtGatweayNodeEncode() {
+
+        KubernetesExternalLbInterface kubernetesExternalLbInterface =
+                DefaultKubernetesExternalLbInterface.builder()
+                        .externalLbBridgeName("elbnetwork")
+                        .externalLbIp(IpAddress.valueOf("10.10.10.2"))
+                        .externallbGwIp(IpAddress.valueOf("10.10.10.1"))
+                        .externalLbGwMac(MacAddress.valueOf("aa:bb:cc:dd:ee:ff"))
+                        .build();
+
         KubevirtNode node = DefaultKubevirtNode.builder()
                 .hostname("gateway")
                 .type(KubevirtNode.Type.GATEWAY)
@@ -166,10 +178,7 @@
                 .tunBridge(DeviceId.deviceId("br-tun"))
                 .dataIp(IpAddress.valueOf("20.20.20.2"))
                 .gatewayBridgeName("gateway")
-                .elbBridgeName("elbnet")
-                .elbIp(IpAddress.valueOf("192.168.0.2"))
-                .elbGwIp(IpAddress.valueOf("192.168.0.1"))
-                .elbGwMac(MacAddress.valueOf("AA:BB:CC:DD:EE:FF"))
+                .kubernetesExternalLbInterface(kubernetesExternalLbInterface)
                 .build();
 
         ObjectNode nodeJson = kubevirtNodeCodec.encode(node, context);
@@ -186,6 +195,8 @@
     public void testKubevirtGatewayNodeDecode() throws IOException {
         KubevirtNode node = getKubevirtNode("KubevirtGatewayNode.json");
 
+        KubernetesExternalLbInterface externalLbInterface = node.kubernetesExternalLbInterface();
+
         assertThat(node.hostname(), is("gateway-01"));
         assertThat(node.type().name(), is("GATEWAY"));
         assertThat(node.managementIp().toString(), is("172.16.130.4"));
@@ -193,10 +204,10 @@
         assertThat(node.intgBridge().toString(), is("of:00000000000000a1"));
         assertThat(node.tunBridge().toString(), is("of:00000000000000a2"));
         assertThat(node.gatewayBridgeName(), is("gateway"));
-        assertThat(node.elbBridgeName(), is("elbnet"));
-        assertThat(node.elbIp().toString(), is("192.168.0.2"));
-        assertThat(node.elbGwIp().toString(), is("192.168.0.1"));
-        assertThat(node.elbGwMac().toString(), is("AA:BB:CC:DD:EE:FF"));
+        assertThat(externalLbInterface.externalLbBridgeName(), is("elbnet"));
+        assertThat(externalLbInterface.externalLbIp().toString(), is("10.10.10.2"));
+        assertThat(externalLbInterface.externalLbGwIp().toString(), is("10.10.10.1"));
+        assertThat(externalLbInterface.externalLbGwMac().toString(), is("AA:BB:CC:DD:EE:FF"));
     }
 
     /**
@@ -227,6 +238,10 @@
                 return (JsonCodec<T>) kubevirtPhyInterfaceJsonCodec;
             }
 
+            if (entityClass == KubernetesExternalLbInterface.class) {
+                return (JsonCodec<T>) kubernetesExternalLbInterfaceJsonCodec;
+            }
+
             return manager.getCodec(entityClass);
         }
 
diff --git a/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntf.json b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntf.json
new file mode 100644
index 0000000..697c416
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubernetesExternalLbIntf.json
@@ -0,0 +1,6 @@
+{
+  "externalLbBridgeName": "elbnet",
+  "externalLbIp": "10.10.10.2",
+  "externalLbGwIp": "10.10.10.1",
+  "externalLbGwMac": "aa:bb:cc:dd:ee:ff"
+}
\ No newline at end of file
diff --git a/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtGatewayNode.json b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtGatewayNode.json
index 85a11a7..ec81558 100644
--- a/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtGatewayNode.json
+++ b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtGatewayNode.json
@@ -6,8 +6,10 @@
   "integrationBridge": "of:00000000000000a1",
   "tunnelBridge": "of:00000000000000a2",
   "gatewayBridgeName": "gateway",
-  "elbBridgeName": "elbnet",
-  "elbIp": "192.168.0.2",
-  "elbGwIp": "192.168.0.1",
-  "elbGwMac": "aa:bb:cc:dd:ee:ff"
+  "kubernetesExternalLbInterface": {
+    "externalLbBridgeName": "elbnet",
+    "externalLbIp": "10.10.10.2",
+    "externalLbGwIp": "10.10.10.1",
+    "externalLbGwMac": "aa:bb:cc:dd:ee:ff"
+  }
 }
\ No newline at end of file