Skip to content

Commit

Permalink
add command to get podman subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
maxerenberg authored and Max Erenberg committed Jun 5, 2023
1 parent 5dfe280 commit d7aa96d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions site/content/docs/user/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ To complete layer2 configuration, we need to provide MetalLB a range of IP addre
docker network inspect -f '{{.IPAM.Config}}' kind
{{< /codeFromInline >}}

If you are using podman 4.0 or higher in rootful mode with the netavark network backend, use the following command instead:
{{< codeFromInline lang="bash" >}}
podman network inspect -f '{{range .Subnets}}{{if eq (len .Subnet.IP) 4}}{{.Subnet}}{{end}}{{end}}' 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.

```yaml
Expand Down

0 comments on commit d7aa96d

Please sign in to comment.