This feature is available in Enterprise Edition only. It might significantly change in the future. Currently, it's not intended to be used without special assistance from Flant.

KeepalivedInstance

Scope: Cluster
Version: v1alpha1

The CustomResource for configuring keepalived clusters.

Each KeepalivedInstance CR defines a single keepalived cluster.

metadata.name — the name of the cluster (used in pod names).

  • spec (object)

    Required value.

    • nodeSelector (object)

      Defines the nodeSelector parameter for keepalived pods.

      Format: the standard nodeSelector list. Instance pods inherit this field as is.

      Required value.

    • tolerations (array of objects)

      Defines tolerations for keepalived pods.

      Format: the standard toleration list. Instance pods inherit this field as is.

      • effect (string)

        Defines the taint’s effect this toleration is associated with (it matches any effect if empty).

        Allowed values: NoSchedule, PreferNoSchedule, NoExecute

      • key (string)

        Defines the taint’s key this toleration is associated with (it matches any key if empty).

        If the key is omitted (emplty), then operator must be set to Exists (which means it matches any value and key).

      • operator (string)

        Defines how the key and its value are linked — whether the key must be Equal to the value or can have any value.

        Setting it to Exists is equivalent to the value having any value so that the pod with the specified toleration can match the corresponding taint.

        Default: "Equal"

        Allowed values: Exists, Equal

      • tolerationSeconds (integer)

        Specifies the period (in seconds) that the scheduler waits before evicting a Pod from a node if the toleration no longer matches the taint (only applicable to the NoExecute effect, otherwise ignored).

        If the parameter is not set, the Pod will not be evicted from the node if the toleration no longer matches the taint. If the parameter is set to zero (or negative), the Pod will be evicted immediately if the toleration no longer matches the taint.

        The default is: not set.

      • value (string)

        The value that the toleration must match.

        Must be empty if the operator parameter is set to Exists.

    • vrrpInstances (array of objects)

      A list of VRRP instances in the keepalived cluster. Essentially, it is a list of address groups that migrate between servers simultaneously and cannot work separately.

      Do not confuse vrrpInstance with KeepalivedInstance. vrrpInstance is a component of KeepalivedInstance.

      The keepalived module configures VRRP instances so that all addresses (all groups) are evenly distributed across all servers (instead of gathering together on the same node).

      Required value.

      • id (integer)

        A unique cluster-wide identifier of a VRRP group.

        Do not use the same ID in different KeepalivedInstance instances unless you have a perfect reason to do so.

        Allowed values: 1 <= X <= 255

        Required value.

      • interface (object)

        Defines the strategy of detecting interface for the service VRRP traffic on the node.

        Required value.

        • detectionStrategy (string)

          You can select one of the following three interface detecting strategis:

          • Name — set the interface name explicitly using the spec.vrrpInstances[].interface.name parameter. In this case, all nodes must have the same interface that serves the correct network (e.g., eth0).
          • NetworkAddress — find an interface with an IP from this subnet on the node and use it.
          • DefaultRoute — use the interface for the default route on the node (254 “main” in the table).
        • name (string)

          The name of the interface for the service VRRP traffic if the Name detectionStrategy is used.

          A mandatory parameter if detectionStrategy = Name.

          Length: 1..∞

        • networkAddress (string)

          The address of the subnet to use for determining an interface if detectionStrategy = NetworkAddress.

          A mandatory parameter if detectionStrategy = NetworkAddress.

          Pattern: ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$

          Example: "192.168.42.0/24"

      • preempt (boolean)

        Defines if the IP is passed to a node after its recovery from a failure.

        It makes sense not to pass the IP if you have just one vrrpInstance to preserve connections. If you have a lot of groups and a lot of traffic, it is better to pass it to prevent the concentration of all groups on one node.

        The default istrue, that is, the IP will passed to a node after its recovery.

      • virtualIPAddresses (array of objects)

        A list of IP addresses that will “jump” between the servers in tandem

        Required value.

        • address (string)

          One of the group addresses.

          Pattern: ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$

          Example: "192.168.42.15/32"

          Required value.

        • interface (object)

          An interface for binding a virtual IP address on a node (similar to spec.vrrpInstances[].interface).

          If omitted, the main service interface defined in spec.vrrpInstances[].interface will be used.

          Not required value.

          • detectionStrategy (string)

            You can select one of the following three interface detecting strategis ti bind an IP address:

            • Name — set the interface name explicitly using the spec.vrrpInstances[].virtualIPAddresses[].interface.name parameter. In this case, all nodes must have the same interface that serves the correct network (e.g., eth0).
            • NetworkAddress — find an interface with an IP from this subnet on the node and use it.
            • DefaultRoute — use the interface for the default route on the node (254 “main” in the table).
          • name (string)

            A name of the interface to bind a virtual IP address if virtualIPaddresses[].detectionStrategy = Name is used.

            A mandatory parameter if virtualIPaddresses[].detectionStrategy = Name.

            Length: 1..∞

          • networkAddress (string)

            The address of the subnet to use for determining an interface if virtualIPaddresses[].detectionStrategy = NetworkAddress.

            A mandatory parameter if virtualIPaddresses[].detectionStrategy = NetworkAddress.

            Pattern: ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$

            Example: "192.168.42.0/24"