API reference docs

API Reference

Packages

metallb.io/v1beta1

Resource Types

BFDProfile

BFDProfile represents the settings of the bfd session that can be optionally associated with a BGP session.

Field Description
apiVersion string metallb.io/v1beta1
kind string BFDProfile
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec BFDProfileSpec

BFDProfileSpec

BFDProfileSpec defines the desired state of BFDProfile.

Appears in:

Field Description
receiveInterval integer The minimum interval that this system is capable ofreceiving control packets in milliseconds.Defaults to 300ms.
transmitInterval integer The minimum transmission interval (less jitter)that this system wants to use to send BFD control packets inmilliseconds. Defaults to 300ms
detectMultiplier integer Configures the detection multiplier to determinepacket loss. The remote transmission interval will be multipliedby this value to determine the connection loss detection timer.
echoInterval integer Configures the minimal echo receive transmissioninterval that this system is capable of handling in milliseconds.Defaults to 50ms
echoMode boolean Enables or disables the echo transmission mode.This mode is disabled by default, and not supported on multihops setups.
passiveMode boolean Mark session as passive: a passive session will notattempt to start the connection and will wait for control packetsfrom peer before it begins replying.
minimumTtl integer For multi hop sessions only: configure the minimumexpected TTL for an incoming BFD control packet.

BGPAdvertisement

BGPAdvertisement allows to advertise the IPs coming from the selected IPAddressPools via BGP, setting the parameters of the BGP Advertisement.

Field Description
apiVersion string metallb.io/v1beta1
kind string BGPAdvertisement
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec BGPAdvertisementSpec

BGPAdvertisementSpec

BGPAdvertisementSpec defines the desired state of BGPAdvertisement.

Appears in:

Field Description
aggregationLength integer The aggregation-length advertisement option lets you “roll up” the /32s into a larger prefix. Defaults to 32. Works for IPv4 addresses.
aggregationLengthV6 integer The aggregation-length advertisement option lets you “roll up” the /128s into a larger prefix. Defaults to 128. Works for IPv6 addresses.
localPref integer The BGP LOCAL_PREF attribute which is used by BGP best path algorithm,Path with higher localpref is preferred over one with lower localpref.
communities string array The BGP communities to be associated with the announcement. Each item can be a standard community of theform 1234:1234, a large community of the form large:1234:1234:1234 or the name of an alias defined in theCommunity CRD.
ipAddressPools string array The list of IPAddressPools to advertise via this advertisement, selected by name.
ipAddressPoolSelectors LabelSelector array 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.
nodeSelectors LabelSelector array 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.
peers string array Peers limits the bgppeer to advertise the ips of the selected pools to.When empty, the loadbalancer IP is announced to all the BGPPeers configured.

Community

Community is a collection of aliases for communities. Users can define named aliases to be used in the BGPPeer CRD.

Field Description
apiVersion string metallb.io/v1beta1
kind string Community
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec CommunitySpec

CommunityAlias

Appears in:

Field Description
name string The name of the alias for the community.
value string The BGP community value corresponding to the given name. Can be a standard community of the form 1234:1234or a large community of the form large:1234:1234:1234.

CommunitySpec

CommunitySpec defines the desired state of Community.

Appears in:

Field Description
communities CommunityAlias array

IPAddressPool

IPAddressPool represents a pool of IP addresses that can be allocated to LoadBalancer services.

Field Description
apiVersion string metallb.io/v1beta1
kind string IPAddressPool
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec IPAddressPoolSpec

IPAddressPoolSpec

IPAddressPoolSpec defines the desired state of IPAddressPool.

Appears in:

Field Description
addresses string array A list of IP address ranges over which MetalLB has authority.You can list multiple ranges in a single pool, they will all share thesame settings. Each range can be either a CIDR prefix, or an explicitstart-end range of IPs.
autoAssign boolean AutoAssign flag used to prevent MetallB from automatic allocationfor a pool.
avoidBuggyIPs boolean AvoidBuggyIPs prevents addresses ending with .0 and .255to be used by a pool.
serviceAllocation ServiceAllocation AllocateTo makes ip pool allocation to specific namespace and/or service.The controller will use the pool with lowest value of priority in case ofmultiple matches. A pool with no priority set will be used only if thepools with priority can’t be used. If multiple matching IPAddressPools areavailable it will check for the availability of IPs sorting the matchingIPAddressPools by priority, starting from the highest to the lowest. Ifmultiple IPAddressPools have the same priority, choice will be random.

L2Advertisement

L2Advertisement allows to advertise the LoadBalancer IPs provided by the selected pools via L2.

Field Description
apiVersion string metallb.io/v1beta1
kind string L2Advertisement
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec L2AdvertisementSpec

L2AdvertisementSpec

L2AdvertisementSpec defines the desired state of L2Advertisement.

Appears in:

Field Description
ipAddressPools string array The list of IPAddressPools to advertise via this advertisement, selected by name.
ipAddressPoolSelectors LabelSelector array 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.
nodeSelectors LabelSelector array 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.
interfaces string array 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.

ServiceAllocation

ServiceAllocation defines ip pool allocation to namespace and/or service.

Appears in:

Field Description
priority integer Priority priority given for ip pool while ip allocation on a service.
namespaces string array Namespaces list of namespace(s) on which ip pool can be attached.
namespaceSelectors LabelSelector array NamespaceSelectors list of label selectors to select namespace(s) for ip pool,an alternative to using namespace list.
serviceSelectors LabelSelector array ServiceSelectors list of label selector to select service(s) for which ip poolcan be used for ip allocation.

metallb.io/v1beta2

Resource Types

BGPPeer

BGPPeer is the Schema for the peers API.

Field Description
apiVersion string metallb.io/v1beta2
kind string BGPPeer
kind string 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
apiVersion string APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest internal value, andmay reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec BGPPeerSpec

BGPPeerSpec

BGPPeerSpec defines the desired state of Peer.

Appears in:

Field Description
myASN integer AS number to use for the local end of the session.
peerASN integer AS number to expect from the remote end of the session.
peerAddress string Address to dial when establishing the session.
sourceAddress string Source address to use when establishing the session.
peerPort integer Port to dial when establishing the session.
holdTime Duration Requested BGP hold time, per RFC4271.
keepaliveTime Duration Requested BGP keepalive time, per RFC4271.
connectTime Duration Requested BGP connect time, controls how long BGP waits between connection attempts to a neighbor.
routerID string BGP router ID to advertise to the peer
nodeSelectors LabelSelector array Only connect to this peer on nodes that match one of theseselectors.
password string Authentication password for routers enforcing TCP MD5 authenticated sessions
passwordSecret SecretReference passwordSecret is name of the authentication secret for BGP Peer.the secret must be of type “kubernetes.io/basic-auth”, and created in thesame namespace as the MetalLB deployment. The password is stored in thesecret as the key “password”.
bfdProfile string The name of the BFD Profile to be used for the BFD session associated to the BGP session. If not set, the BFD session won’t be set up.
enableGracefulRestart boolean EnableGracefulRestart allows BGP peer to continue to forward data packets alongknown routes while the routing protocol information is being restored.This field is immutable because it requires restart of the BGP sessionSupported for FRR mode only.
ebgpMultiHop boolean To set if the BGPPeer is multi-hops away. Needed for FRR mode only.
vrf string To set if we want to peer with the BGPPeer using an interface belonging toa host vrf
disableMP boolean To set if we want to disable MP BGP that will separate IPv4 and IPv6 route exchanges into distinct BGP sessions.