Close
    logo                                         

    k8s-metallb-system

    MetalLB Load-balancer for kubernetes

    Template version:v24-04-20

    MetalLB manifest version: v0.14.4

    This template contains the configuration files needed to run MetalLB load balanced in a Kubernetes cluster.

    MetalLB is a load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols.

    Note: MetalLB is a cluster service, and as such can only be deployed as a cluster singleton. Running multiple installations of MetalLB in a single cluster is not supported.


    Template override parameters

    File _values-tpl.yaml contains template configuration parameters and their default values:

    #
    # _values-tpl.yaml
    #
    # cskygen template default values file
    #
    _tplname: k8s-metallb-system
    _tpldescription: MetalLB load-balancer for bare metal Kubernetes clusters
    _tplversion: 24-04-20
    #
    # Values to override
    #
    ## k8s cluster credentials kubeconfig file
    kubeconfig: config-k8s-mod
    namespace:
    ## k8s namespace name (mandatory)
    name: metallb-system
    ## MetalLB static and dynamic ip addresses pools
    metallb:
    staticpooladdr:
    - 192.168.82.20/32 # k8s-ingress
    - 192.168.82.21/32 # mosquitto iot-studio
    - 192.168.82.22/32 # mosquitto iot-edge
    dynamicpooladdr:
    - 192.168.82.75-192.168.82.90 # Auto assigned

    TL;DR

    • Before deploying, review or modify IP address pools values in file config.yaml
    • To deploy namespace and chart:
    # Install
    ./csdeploy.sh -m install
    # Config IP address pools
    ./csdeploy.sh -m config
    # Check status
    ./csdeploy.sh -l

    Prerequisites

    • Administrative access to Kubernetes cluster.
    • No instance of MetalLB running on K8s cluster.
    • MetalLB IP Addresses pools configured in file resources.yaml

    How-to guides

    Install

    To Create namespace and apply manifest:

    ./csdeploy.sh -m install
    • After installing you must configure the desired IP Addresses pools.

    Note: Be sure all metallb pods are running before configuring IP pools.

    Configure IP Addresses pools

    To modify IP Addresses pools edit file resources.yaml and configure addresses for static and dynamic pools.

    Configure IP pools by running:

    ./csdeploy.sh -m config

    Note: config deploy mode will only update IP addresses & configuration values in resources.yaml. MetalLB manifest is only applied in install deploy mode.

    Remove

    To remove namespace and all its contents run:

    ./csdeploy.sh -m remove

    Display status

    To display namespace status run:

    # Display namespace config-map and chart status:
    ./csdeploy.sh -l

    Reference

    To learn more see:

    Scripts

    csdeploy

    MetalLB v0.13.4 configuration.
    Use this script to deploy and configure metallb-system namespace.
    Usage:
    sudo csdeploy.sh [-l] [-m <execution_mode>] [-h] [-q]
    Execution modes:
    -l [list-status] - List current status.
    -m <execution_mode> - Valid modes are:
    [install] - Install metallb-system namespace and manifests.
    [remove] - Remove manifests and metallb-system namespace.
    [config] - Configure resources.yaml with address pools and options.
    Options and arguments:
    -h Help
    -q Quiet (Nonstop) execution.
    Examples:
    # Install namespace and mainfests:
    ./csdeploy.sh -m install
    # Configure address pools and options in file resources.yaml:
    ./csdeploy.sh -m config
    # Remove manifests and metallb-system namespace
    ./csdeploy.sh -m remove
    # Display namespace status:
    ./csdeploy.sh -l

    License

    Copyright © 2021 cSkyLab.com ™

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.