docker network ls
docker network create
docker network connect
docker network create [OPTIONS] NETWORK
[root@master ~]# docker network create aaa
docker network connect [OPTIONS] NETWORK CONTAINER
[root@master ~]# docker run -i -t --rm --name=busybox busybox /bin/sh
[root@master ~]# docker network connect aaa busybox
[root@master ~]# docker network create bbb --attachable --driver bridge --subnet "192.168.0.1/24"
docker network ls
The DRIVER
accepts bridge
or overlay
--driver
docker network create -d bridge my-bridge-network
docker network create -d overlay my-multihost-network
您可以使用以下两个命令之一检查节点的 podCidr
kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}'
kubectl get nodes -o template --template={{.spec.podCIDR}}
如果没有可以手动修改
kubectl patch node <NODE_NAME> -p '{"spec":{"podCIDR":"<SUBNET>"}}