L2LoadBalancer

Scope: Namespaced
Version: v1alpha1

The interface for configuring distributed L2 load balancers.

Caution! The module is experimental. It is actively developed and its features and API might significantly change in the future.

  • specobject

    Required value

    This feature is available in enterprise edition only.

    • spec.addressPoolstring

      Required value

      MetalLB address pool for public IP address allocation.

      This feature is available in enterprise edition only.

    • spec.nodeSelectorobject

      The group of load balancer nodes to serve the public IP addresses.

      The same as in the Pods spec.nodeSelector parameter in Kubernetes.

      If parameter is omitted, L2 LoadBalancer’s speakers will be placed on all nodes.

      This feature is available in enterprise edition only.

    • spec.serviceobject

      Required value

      The spec of application’s Service.

      This feature is available in enterprise edition only.

      • spec.service.externalTrafficPolicystring

        Denotes if this L2 LoadBalancer desires to route external traffic to node-local or cluster-wide endpoints. There are two available options: Local (default) and Cluster.

        • Local (by default) — traffic is routed to pods located on the same node as L2 LoadBalancer speaker.
        • Cluster — traffic can be routed to any pod in the cluster.

        Default: "Local"

        This feature is available in enterprise edition only.

        Allowed values: Local, Cluster

      • spec.service.portsarray of objects

        Required value

        The list of ports that are exposed by this service.

        This feature is available in enterprise edition only.

        • spec.service.ports.namestring

          The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the ‘name’ field in the EndpointPort

        • spec.service.ports.portinteger

          The port that will be exposed by this service.

        • spec.service.ports.protocolstring

          The IP protocol for this port. Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.

          Default: "TCP"

        • spec.service.ports.targetPortinteger

          Number of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535.

      • spec.service.selectorobject

        Required value

        The same as in the Service spec.selector parameter in Kubernetes.

        This feature is available in enterprise edition only.

      • spec.service.sourceRangesarray of strings

        IP ranges (CIDR) that are allowed to access the load balancer.

        Default: []

        This feature is available in enterprise edition only.

        • Element of the arraystring

          Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$