Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest in the documentation to wait until the MetalLB controller pod is ready #2973

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions site/content/docs/user/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ menu:
description: |-
This guide covers how to get service of type LoadBalancer working in a kind cluster using [Metallb].

This guide complements metallb [installation docs], and sets up metallb using layer2 protocol. For other protocols check metallb [configuration docs].
This guide complements MetalLB [installation docs], and sets up MetalLB using layer2 protocol. For other protocols check MetalLB [configuration docs].

With Docker on Linux, you can send traffic directly to the loadbalancer's external IP if the IP space is within the docker IP space.

On macOS and Windows, docker does not expose the docker network to the host. Because of this limitation, containers (including kind nodes) are only reachable from the host via port-forwards, however other containers/pods can reach other things running in docker including loadbalancers. You may want to check out the [Ingress Guide] as a cross-platform workaround. You can also expose pods and services using extra port mappings as shown in the extra port mappings section of the [Configuration Guide].


[Metallb]: https://metallb.universe.tf/
[MetalLB]: https://metallb.universe.tf/
[installation docs]: https://metallb.universe.tf/installation/
[configuration docs]: https://metallb.universe.tf/configuration/

Expand All @@ -24,32 +24,35 @@ description: |-

---

## Installing metallb using default manifests
## Installing MetalLB using default manifests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a breaking change to the heading id for incoming links, but that seems fine this time


### Apply metallb manifest
### Apply MetalLB manifest

Since version 0.13.0, MetalLB is configured via CRs and the original way of configuring it via a ConfigMap based configuration
is not working anymore.

{{< codeFromInline lang="bash" >}}
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.5/config/manifests/metallb-native.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.7/config/manifests/metallb-native.yaml
{{< /codeFromInline >}}

Wait for metallb pods to have a status of Running
Wait until the MetalLB pods (controller and speakers) are ready:

{{< codeFromInline lang="bash" >}}
kubectl get pods -n metallb-system --watch
kubectl wait --namespace metallb-system \
--for=condition=ready pod \
--selector=app=metallb \
--timeout=90s
{{< /codeFromInline >}}

### Setup address pool used by loadbalancers

To complete layer2 configuration, we need to provide metallb a range of IP addresses it controls. We want this range to be on the docker kind network.
To complete layer2 configuration, we need to provide MetalLB a range of IP addresses it controls. We want this range to be on the docker kind network.

{{< codeFromInline lang="bash" >}}
docker network inspect -f '{{.IPAM.Config}}' kind
{{< /codeFromInline >}}

The output will contain a cidr such as 172.19.0.0/16. We want our loadbalancer IP range to come from this subclass. We can configure metallb, for instance, to use 172.19.255.200 to 172.19.255.250 by creating the IPAddressPool and the related L2Advertisement.
The output will contain a cidr such as 172.19.0.0/16. We want our loadbalancer IP range to come from this subclass. We can configure MetalLB, for instance, to use 172.19.255.200 to 172.19.255.250 by creating the IPAddressPool and the related L2Advertisement.

```yaml
{{% readFile "static/examples/loadbalancer/metallb-config.yaml" %}}
Expand Down