Hi All,
I'm trying to set up an overlay network in docker-compose using consul as external key etc. I WAS getting the error "ERROR: error getting pools config from store: could not get pools config from store:" which mentioned ipam, so I added an ipam section in my network declaration and now I get this: "ERROR: Invalid subnet : invalid CIDR address:"
My config follows:
networks:
workernet:
driver: overlay
ipam:
driver: default
config:
- subnet: "192.168.0.0/24"
- gateway: "192.168.0.1"
default:
driver: bridge
Could someone tell me where I've gone wrong and show me how this is supposed to work? I should mention that I've been working with and googling this for 3 days with no success.
Thanks in advance!
Your config section is not formatted correctly. It should look like this (note the absence of a dash on the second line):
config:
- subnet: "192.168.0.0/24"
gateway: "192.168.0.1"
HTH
Hi @shin- i m getting the same error with the below configuration
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: cms-oam-eth1
namespace: cms
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "eth0",
"mode": "bridge",
"ipam": {
"type": "host-local",
"datastore": "kubernetes",
"kubernetes": { "kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig" },
"subnet": "192.169.1.0/24",
"rangeStart": "192.169.1.2",
"rangeEnd": "192.169.1.240",
"gateway": "192.169.1.1",
"log_file" : "/tmp/whereabouts.log",
"log_level" : "debug"
}
}
Normal Scheduled 19s default-scheduler Successfully assigned cms/cms1-0 to k8s-worker-1
Warning FailedCreatePodSandBox 13s kubelet, k8s-worker-1 Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "bdc93dc123701afa226cd844fde27d3c9d20882a0f8c0bd117c4f1381d094df3": Multus: error adding pod to network "cms-oam-eth1": delegateAdd: error invoking DelegateAdd - "macvlan": invalid CIDR : invalid CIDR address:
Warning FailedCreatePodSandBox 6s kubelet, k8s-worker-1 Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "4af83c0247d2fcda83cdf7a53990d84053a89f891839adc7f95a71c7490acec5": Multus: error adding pod to network "cms-oam-eth1": delegateAdd: error invoking DelegateAdd - "macvlan": invalid CIDR : invalid CIDR address:
Can u plz help how to resolve this issue
Most helpful comment
Your config section is not formatted correctly. It should look like this (note the absence of a dash on the second line):
HTH