kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.31k stars 1.54k forks source link

website docs: Error response from daemon: network {{.IPAM.Config}} not found #3385

Open todd-dsm opened 11 months ago

todd-dsm commented 11 months ago

Get the Docker Network for MetalLB

The kind docs maybe listing some older Docker configs here; the correct value is output but is accompanied by the error above it:

% docker network inspect -f json '{{.IPAM.Config}}' kind | jq '.[].IPAM.Config[0].Subnet'    
Error response from daemon: network {{.IPAM.Config}} not found
"172.18.0.0/16"

Not sure what the right answer is but this totally works without the error:

docker network inspect kind | jq -r '.[].IPAM.Config'

I used this for scripting; worked great

docker network inspect kind | jq -r '.[].IPAM.Config[0].Subnet'

In any case, this seems like an easy fix for the docs.

radeksm commented 10 months ago

Hi @todd-dsm, It looks like current version of LoadBalancer docs already have that fixed. docker network inspect -f '{{.IPAM.Config}}' kind

Above is pretty much equivalent to your command docker network inspect kind | jq -r '.[].IPAM.Config'