# MetalLB AddOn Failing repository does not exist or may require 'docker login'

## Problem

While trying to install or upgrade MetalLB Addon from Management Plane the docker logs shows following error:

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

```javascript
Error response from daemon: pull access denied for metallb/controller, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed Kubernetes - v5.4 and Higher
* MetalLB AddOn

## Cause

MetalLB images that were earlier hosted on [Docker](https://docker.io/) have now moved to [Quay](http://quay.io/) officially. The old deployments are trying to reach the docker image repository which is causing this failure.

## Resolution

Upgrade the Kubernetes cluster to any of the below list or higher version, that contains the fix with correct MetalLB repository

{% tabs %}
{% tab title="pf9-kube Versions" %}

```javascript
v1.21 -> 1.21.3-pmk.443
v1.22 -> 1.22.9-pmk.299
v1.23 -> 1.23.8-pmk.277
v1.24 -> 1.24.7-pmk.130
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**NOTE**

Patches for **v1.20** will be available soon.

If upgrade of cluster is not feasible proceed with the below **workaround** steps.
{% endhint %}

## Workaround

* Edit the MetalLB `controller`*deployment* and change image location to quay:

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

```javascript
$ kubectl get deploy controller -n metallb-system -o yaml | grep image:
        image: metallb/controller:v0.10.2
```

{% endtab %}
{% endtabs %}

* Update image to `quay.io/metallb/controller:v0.10.2`

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

```javascript
$ kubectl edit deploy controller -n metallb-system
deployment.apps/controller edited

$ kubectl get deploy controller -n metallb-system -o yaml | grep image:
        image: quay.io/metallb/controller:v0.10.2
```

{% endtab %}
{% endtabs %}

* Edit the MetalLB `speaker` *daemonset* and the change image location to quay

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

```javascript
$ kubectl get daemonset speaker -n metallb-system -o yaml | grep image:
        image: metallb/speaker:v0.10.2
```

{% endtab %}
{% endtabs %}

* Update image to `quay.io/metallb/speaker:v0.10.2`

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

```javascript
$ kubectl edit daemonset speaker -n metallb-system
daemonset.apps/speaker edited

$ kubectl get daemonset speaker -n metallb-system -o yaml | grep image:
        image: quay.io/metallb/speaker:v0.10.2
```

{% endtab %}
{% endtabs %}

## Additional Information

Reference <https://github.com/metallb/metallb/issues/696#issuecomment-714652624>.


---

# Agent Instructions: 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 current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmk/solutions/metallb-addon-failing-with-repository-does-not-exist-or-may-requ.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
