> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pcd-ts/kubernetes-clusters/troubleshooting-calico-add-onq6mqlt.md).

# Troubleshooting MetalLB Add-on

Troubleshoot MetalLB issues in PCD-K Kubernetes clusters with our guide. Learn to verify pod statuses, check IP address pools, validate endpoints, and identify common causes like misconfigured IP rang

## Problem

MetalLB offers external load balancing for applications within PCD-K clusters. As an external add-on for PCD-K Kubernetes clusters, MetalLB's broken functionality can significantly impact service availability. When MetalLB experiences issues, here's a general guide on how to troubleshoot CoreDNS Add-on Issues.

## Environment

* Private Cloud Director - v2025.4 and Higher.
* Kubernetes Cluster - 1.31.2 or Higher.

## Procedure

1. MetalLB has all MetalLB objects, a controller pod and speakers pods per worker node deployed in the `metallb-system` namespace. Verify the pod status in the namespace using the command:

{% tabs %}
{% tab title="Verify MetalLB pods" %}

```bash
$ kubectl get pods -n metallb-system
```

{% endtab %}
{% endtabs %}

2. Review why these pods are in "`CrashLoopBackOff/OOMkilled/Pending/Error`" state, see the events sections part of the command:

{% tabs %}
{% tab title="Check events" %}

```bash
$ kubectl describe <pod-name> -n metallb-system
```

{% endtab %}
{% endtabs %}

3. Validate if the `MetalLB` service shows the correct IP address pools using command:

{% tabs %}
{% tab title="Get IPaddressPool details" %}

```bash
$ kubectl get IPAddressPool -n metallb-system
```

{% endtab %}
{% endtabs %}

4. Verify that the `metallb-webhook-service` service has correct endpoint IP address of the `metallb-controller` pod.
5. Get more information on the failure from pod logs using command:

{% tabs %}
{% tab title="Command" %}

```bash
$ kubectl logs <pod-name> -n metallb-system
```

{% endtab %}
{% endtabs %}

6. Ensure that **MetalLB VIP/MAC** address pair mapping is added on all the worker nodes. As Mac address spoofing is not allowed by Port Security.
7. If these steps prove insufficient to resolve the issue, kindly reach out to the [Platform9 Support Team](https://support.platform9.com) for additional assistance.

## Most Common causes:

* Incorrect IP range mentioned in the `IPAddressPools`.
* `L2Advertisement` or `BGPAdvertisement` resources are not created as per `IPAddressPools` Or advertisements are misconfigured.
* MetalLB VIP/MAC address pair mapping is missing on all/some of the worker nodes.
* Check Calico pod logs for errors, since MetalLB relies on Calico's functionality.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pcd-ts/kubernetes-clusters/troubleshooting-calico-add-onq6mqlt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
