Closed withlin closed 3 years ago
I create another pod,which not annotations k8s.v1.cni.cncf.io/networks: mac-vlan-config
that pod is create successfully.
hi @withlin
I have the same problem as you, Can you tell me if this problem is solved? thanks
hi @cyclinder It’s been a long time, I probably remember that the network card name is configured incorrectly.
I found some issues that reported the same problem, It seems to the network interface eth0 does not exist in the node
cat <<EOF | kubectl create -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "eth0", // there
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "192.168.1.0/24",
"rangeStart": "192.168.1.200",
"rangeEnd": "192.168.1.216",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"gateway": "192.168.1.1"
}
}'
EOF
but I edit master
filed in the macvlan-conf
and change the value eth0
to ens192
, it works😄
the network card name is configured incorrectly.
@cyclinder Isn't this what i said
@withlin @cyclinder What should master be set to? I have multiple nodes. Can I just set up any network card?
@withlin @cyclinder What should master be set to? I have multiple nodes. Can I just set up any network card?
You can set a virtual interface with common name between all nodes or rename the current interface matching with MAC address.
What happend:
What you expected to happen:
It should create po
How to reproduce it (as minimally and precisely as possible):Anything else we need to know?:
Environment:
Multus version
docker.io/nfvpe/multus:stable
Kubernetes version (use
kubectl version
):Primary CNI for Kubernetes cluster:
alauda/kube-ovn
OS (e.g. from /etc/os-release):
File of '/etc/cni/net.d/'
File of '/etc/cni/multus/net.d'
NetworkAttachment info (use
kubectl get net-attach-def -o yaml
)Target pod yaml info (with annotation, use
kubectl get pod <podname> -o yaml
)