GHOSTby AlphaBravo
CatalogWhy GhostContactAccount
Ghost Container Registry — Secure, signed, FIPS-ready images·Built by AlphaBravo
Catalog/metallb-controller/Guides

metallb controller

FIPS 140-3Networking

MetalLB controller component manages IP address allocations for LoadBalancer services on bare metal Kubernetes clusters.

OverviewGuidesTags

Quick Start

Pull the latest version of this image from the Ghost registry. Pulling requires authentication — generate a token and run docker login first (see Authentication below).

Authentication

The Ghost catalog is public to browse, but pulling images requires an account. Generate a pull token below (or from your Account → Tokens page) — you'll get a ready-to-paste docker login command, then docker pull works.

The username is generated automatically (it looks like robot$<project>+<auto-id>, not the name you typed) and is included in the docker login command above. The secret is shown only once when you create the token.

Verify Signature

All Ghost images are signed with cosign. Verifying the signature before deployment ensures the image has not been tampered with.

Install cosign via brew install cosign or download from the Sigstore releases page.

Using This Image

Reference this image in your Dockerfile as a base layer:

FIPS 140-3 Compliance

This is a vendor-built FIPS-enabled image: its cryptography runs on FIPS 140-3 validated modules configured by the upstream vendor. You can inspect the image metadata:

StandardFIPS 140-3
Crypto moduleVendor-configured validated modules
CryptographyValidated modules only
Use caseGovernment, regulated industries, compliance workloads

Additional Notes

How to use this image

All examples in this guide use the public image. If you've mirrored the repository for your own use (for example, to your Docker Hub namespace), update your commands to reference the mirrored image instead of the public one.

For example:

  • Public image: registry.ghost-prod.alphabravo.io/ghost-base/<repository>:<tag>
  • Mirrored image: <your-namespace>/dhi-<repository>:<tag>

For the examples, you must first use docker login registry.ghost-prod.alphabravo.io to authenticate to the registry to pull the images.

Deploy MetalLB controller

The MetalLB controller component runs as a Deployment in your cluster and is responsible for managing IP address allocations for LoadBalancer services from configured pools.

Run the following command to deploy MetalLB with the controller component. Replace <your-namespace> with your organization's namespace and <tag> with the image variant you want to run.

kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/main/config/manifests/metallb-native.yaml

Or for BGP mode with FRR support:

On this page

Quick StartAuthenticationVerify SignatureUsing This ImageFIPS ComplianceAdditional Notes
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/main/config/manifests/metallb-frr.yaml

If you prefer to use the Ghost hardened image directly in your deployment, replace the controller image in your manifests:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller
  namespace: metallb-system
spec:
  selector:
    matchLabels:
      app: metallb
      component: controller
  template:
    metadata:
      labels:
        app: metallb
        component: controller
    spec:
      nodeSelector:
        kubernetes.io/os: linux
      containers:
      - name: controller
        image: registry.ghost-prod.alphabravo.io/ghost-base/metallb-controller:<tag>
        args:
        - --port=7472
        - --log-level=info
        ports:
        - name: metrics
          containerPort: 7472
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          readOnlyRootFilesystem: true
        resources:
          requests:
            cpu: 100m
            memory: 100Mi

Image variants

Ghost hardened images come in different variants depending on their intended use. Image variants are identified by their tag.

  • Runtime variants are designed to run your application in production. These images are intended to be used either directly or as the FROM image in the final stage of a multi-stage build. These images typically:

    • Run as a nonroot user
    • Do not include a shell or a package manager
    • Contain only the minimal set of libraries needed to run the app
  • Build-time variants typically include dev in the tag name and are intended for use in the first stage of a multi-stage Dockerfile. These images typically:

    • Run as the root user
    • Include a shell and package manager
    • Are used to build or compile applications
  • FIPS variants include fips in the variant name and tag. They come in both runtime and build-time variants. These variants use cryptographic modules that have been validated under FIPS 140, a U.S. government standard for secure cryptographic operations. For example, usage of MD5 fails in FIPS variants.

To view the image variants and get more information about them, select the Tags tab for this repository, and then select a tag.

Migrate to a Ghost hardened image

To migrate your application to a Ghost hardened image, you must update your Kubernetes manifests or Helm charts to use the new image. The following table outlines common migration considerations:

ItemMigration note
Base imageReplace your controller image with the Ghost hardened image in your Deployment or Helm values.
CapabilitiesThe controller does not require elevated capabilities. Ensure capabilities are dropped for security.
Nonroot userBy default, the hardened controller image runs as a nonroot user. Verify that necessary files and directories are accessible to that user.
Service accountThe controller requires appropriate RBAC permissions to watch and update services, endpoints, and MetalLB custom resources.
TLS certificatesGhost hardened images contain standard TLS certificates by default. There is no need to install TLS certificates.
Volume mountsEnsure any mounted configuration files or directories are accessible to the nonroot user running the controller.
Entry pointGhost hardened images may have different entry points than images such as Docker Official Images. Inspect entry points for Ghost hardened images and update your manifests if necessary.
No shellThe hardened controller image doesn't contain a shell. Use dev images in build stages to run shell commands and then copy artifacts to the runtime stage.

The following steps outline the general migration process:

  1. Find hardened images for your deployment.

    Identify which MetalLB images you are using (controller, speaker) and select the corresponding Ghost hardened image variants. A hardened image may have several variants. Inspect the image tags and find the image variant that meets your needs.

  2. Update your image references.

    Update the image references in your Kubernetes manifests, Helm values, or deployment tools to point to the Docker Hardened Images.

  3. Review security contexts.

    Ensure your pod security policies and security contexts are compatible with the hardened image's security requirements.

  4. Test in a non-production environment.

    Deploy to a test cluster first to verify that the hardened image works correctly with your IP pool configuration and service definitions.

  5. Update documentation and runbooks.

    Document the new image versions and any associated configuration changes in your deployment documentation.

Troubleshooting migration

The following are common issues that you may encounter during migration.

General debugging

The hardened images intended for runtime don't contain a shell nor any tools for debugging. The recommended method for debugging applications built with Ghost hardened images is to use Docker Debug to attach to these containers. Docker Debug provides a shell, common debugging tools, and lets you install other tools in an ephemeral, writable layer that only exists during the debugging session.

Permissions

By default image variants intended for runtime, run as a nonroot user. Ensure that necessary files and directories are accessible to that user. You may need to adjust volume mount permissions or change directory ownership so the controller running as a nonroot user can access them.

To view the user for an image variant, select the Tags tab for this repository.

RBAC permissions

The MetalLB controller requires appropriate Kubernetes RBAC permissions to function properly. Ensure your service account has permissions to:

  • Watch and update Service resources
  • Watch EndpointSlice resources
  • Create and update Service status
  • Watch and manage MetalLB custom resources (IPAddressPool, L2Advertisement, BGPAdvertisement, etc.)

If RBAC permissions are missing, the controller will fail to allocate IP addresses or update service status.

IP address allocation

If the controller cannot allocate IP addresses to services:

  • Verify that IPAddressPool resources are correctly configured in the metallb-system namespace
  • Check that the pool has available IP addresses
  • Use kubectl describe service to check for allocation errors in events
  • Review controller logs with kubectl logs for detailed error messages

Configuration validation

Verify that your MetalLB configuration resources are valid:

kubectl get ipaddresspool -n metallb-system
kubectl get l2advertisement -n metallb-system
kubectl get bgpadvertisement -n metallb-system
kubectl describe ipaddresspool -n metallb-system

No shell

By default, image variants intended for runtime don't contain a shell. Use dev images in build stages to run shell commands and then copy any necessary artifacts into the runtime stage. In addition, use Docker Debug to debug containers with no shell. If you need to run diagnostic commands, create a temporary debug container in your cluster to investigate issues.

To see if a shell is available in an image variant and which one, select the Tags tab for this repository.

Entry point

Ghost hardened images may have different entry points than images such as Docker Official Images.

To view the Entrypoint or CMD defined for an image variant, select the Tags tab for this repository, select a tag, and then select the Specifications tab.