KeepalivedInstance
Scope: Cluster
Version: v1alpha1
The custom resource for configuring keepalived clusters.
Each KeepalivedInstance
custom resource defines a single keepalived cluster.
metadata.name
— the name of the cluster (used in pod names).
- array of objects
Defines
tolerations
for keepalived pods.Format: the standard toleration list. Instance pods inherit this field as is.
- 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
- 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.
- array of objects
Required value
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
withKeepalivedInstance
.vrrpInstance
is a component ofKeepalivedInstance
.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).- object
Required value
Defines the strategy of detecting interface for the service VRRP traffic on the node.
- string
You can select one of the following three interface detecting strategis:
Name
— set the interface name explicitly using thespec.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).
- 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:
networkAddress: 192.168.42.0/24
- 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 is —
true
, that is, the IP will passed to a node after its recovery. - array of objects
Required value
A list of IP addresses that will “jump” between the servers in tandem
- object
Not required value.
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.- string
You can select one of the following three interface detecting strategis ti bind an IP address:
Name
— set the interface name explicitly using thespec.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).
- 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:
networkAddress: 192.168.42.0/24