Virtual IP Management Module (Kube VIP)

In the Shturval platform, the Virtual IP Address Management Module (Kube VIP) includes two components:

  • Service configuration component (shturval-vip-provider). It automatically assigns IP addresses to Services of type LoadBalancer.

The controller shturval-vip-provider, when creating a Service with type LoadBalancer in the cluster, allocates and assigns an IP address from the configured CIDR or IP address range. The dedicated IP address is specified in the annotation and the loadBalancerIP parameter of the service. How to configure CIDR or a range of IP addresses is detailed in section.

  • Node configuration component (shturval-vip). Shturval-vip is a DaemonSet that raises assigned IP addresses to Services with type LoadBalancer on cluster nodes. If a service is removed from the cluster, the IP address assigned to the service is “released” from the cluster nodes.

The virtual IP management module components do not require manual configuration.

Additional information can be found on official website.

###Service configuration component

The service configuration component of the virtual IP management module is a critical service for the operation of the Shturval platform (cannot be disabled). Installed by default in the management cluster and client clusters.

To view the status of a service in the cluster, go to the Installed Services page of the Services and Repositories section. Find Virtual IP Address Management Module. Services Configuration Component (shturval-vip-provider) and click Manage.

For the service to work correctly, the Cluster Network Management Module (shturval-networking) must be installed and enabled in the cluster.

Node Configuration Component

The node configuration component of the virtual IP management module is a critical service for the operation of the Shturval platform (cannot be disabled). Installed by default in the management cluster and client clusters.

To view the status of a service in the cluster, go to the Installed Services page of the Services and Repositories section. Find Virtual IP Address Management Module. Node Configuration Component (shturval-vip) and click Manage.

For the service to work correctly, the Cluster Network Management Module (shturval-networking).

Configuration of available IP addresses

You can configure CIDR or a range of IP addresses to allocate and assign Service IP addresses with the LoadBalancer type in ConfigMap. To do this:

  1. In your cluster, go to namespace kube-system and open the ConfigMaps page of the Storage section.
  2. Find the ConfigMap named kubevip and go to editing. If there is no ConfigMap, create one with the name kubevip.
  3. Add a key, where in the name write the required parameter, and in the value indicate CIDR or a range of IP addresses.
List of parameters
ParameterDescriptionExample
cidr-globalGlobal subnet from which IP addresses will be allocated for Service of any namespace in the cluster192.168.0.216/29
range-globalGlobal range of IP addresses from which IP addresses will be allocated for the Service of any namespace in the cluster192.168.1.220-192.168.1.230
cidr-<namespacename>Subnet from which IP addresses will be allocated for Service of a specific namespace192.168.0.216/29
range-<namespacename>The range of IP addresses from which IP addresses will be allocated for the Service of a specific namespace192.168.1.220-192.168.1.230
Global CIDR configuration example
apiVersion: v1
kind: ConfigMap
metadata:
  name: kubevip
  namespace: kube-system
data:
  cidr-global: 192.168.0.216/29
Example configuration for Service of certain namespaces
apiVersion: v1
kind: ConfigMap
metadata:
  name: kubevip
  namespace: kube-system
data:
  cidr-mynamespace: 192.168.0.216/29
  range-mynamespace1: 192.168.1.220-192.168.1.230

After creating a cluster that does not use an external balancer for Ingress, the corresponding IP address of the system Ingress Controller will be recorded in the ConfigMap kubevip.

Example ConfigMap kubevip
apiVersion: v1
kind: ConfigMap
metadata:
  name: kubevip
  namespace: kube-system
data:
  cidr-ingress: 192.168.0.220/32

If a namespace is set to a pool (CIDR or IP address range), Services will only assign addresses from that pool, ignoring the global pool.

If necessary, you can manually set the IP address for a Service with the LoadBalancer type in one of the following ways, even if this address is not included in the specified IP address range:

  • add an annotation with the key kube-vip.io/loadbalancerIPs for Service;
  • when creating Service in the graphical interface, set the IP address in the LoadBalancerIP field.