IPAddressPool
Scope: Namespaced
Version: v1beta1
IPAddressPool represents a pool of IP addresses that can be allocated to LoadBalancer services.
- apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata
- spec
Обязательный параметр
IPAddressPoolSpec defines the desired state of IPAddressPool.
- spec.addresses
Обязательный параметр
A list of IP address ranges over which MetalLB has authority. You can list multiple ranges in a single pool, they will all share the same settings. Each range can be either a CIDR prefix, or an explicit start-end range of IPs.
- spec.autoAssign
AutoAssign flag used to prevent MetalLB from automatic allocation for a pool.
По умолчанию:
true
- spec.avoidBuggyIPs
AvoidBuggyIPs prevents addresses ending with .0 and .255 to be used by a pool.
По умолчанию:
false
L2Advertisement
Scope: Namespaced
Version: v1beta1
L2Advertisement allows to advertise the LoadBalancer IPs provided by the selected pools via L2.
- apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata
- spec
L2AdvertisementSpec defines the desired state of L2Advertisement.
- spec.interfaces
A list of interfaces to announce from. The LB IP will be announced only from these interfaces. If the field is not set, we advertise from all the interfaces on the host.
- spec.ipAddressPoolSelectors
A selector for the IPAddressPools which would get advertised via this advertisement. If no IPAddressPool is selected by this or by the list, the advertisement is applied to all the IPAddressPools.
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- spec.ipAddressPoolSelectors.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- spec.ipAddressPoolSelectors.matchExpressions.key
Обязательный параметр
key is the label key that the selector applies to.
- spec.ipAddressPoolSelectors.matchExpressions.operator
Обязательный параметр
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- spec.ipAddressPoolSelectors.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- spec.ipAddressPoolSelectors.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- spec.ipAddressPools
The list of IPAddressPools to advertise via this advertisement, selected by name.
- spec.nodeSelectors
NodeSelectors allows to limit the nodes to announce as next hops for the LoadBalancer IP. When empty, all the nodes having are announced as next hops.
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- spec.nodeSelectors.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- spec.nodeSelectors.matchExpressions.key
Обязательный параметр
key is the label key that the selector applies to.
- spec.nodeSelectors.matchExpressions.operator
Обязательный параметр
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- spec.nodeSelectors.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- spec.nodeSelectors.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
L2LoadBalancer
Scope: Cluster
Version: v1alpha1
Описывает ресурс L2LoadBalancer для кластера.
- apiVersion
- kind
- metadata
- spec
- spec.addressPool
Массив диапазонов публичных IP-адресов. Каждый диапазон может быть указан с помощью CIDR или прямого указания.
Примеры:
addressPool: 10.42.0.0/24
addressPool: 10.33.5.100-10.33.5.106
- spec.interfaces
Список сетевых интерфесов, с которых будет производиться анонс присвоенных IP адресов.
Если поле не заполнено или задан пустой массив, то будет происходить анонс со всех интерфейсов узла.
Примеры:
interfaces: eth1
interfaces: eth2
- spec.nodeSelector
Позволяет ограничить список узлов, с которых будет происходить анонс.
Задается в виде набора лейблов для фильтрации узлов.