From d7aa96d77ce18557a97b5064713176d04300205c Mon Sep 17 00:00:00 2001 From: Max Erenberg Date: Mon, 5 Jun 2023 04:48:16 -0400 Subject: [PATCH] add command to get podman subnet --- site/content/docs/user/loadbalancer.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/content/docs/user/loadbalancer.md b/site/content/docs/user/loadbalancer.md index 8f7f9ec871..8bfda3280a 100644 --- a/site/content/docs/user/loadbalancer.md +++ b/site/content/docs/user/loadbalancer.md @@ -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