You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accroding to macvlan README, the master is optional,as follows:
master (string, optional): name of the host interface to enslave. Defaults to default route interface.
But when i delete the "master" in the yaml
[root@master ~]# cat macvlan-conf-1.yaml
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf-1
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"mode": "bridge",
"ipam": {
"ranges": [
[ {
"subnet": "192.168.2.0/24",
"rangeStart": "192.168.2.82",
"rangeEnd": "192.168.2.86",
"gateway": "192.168.2.4"
} ]
]
}
}'
[root@master ~]# Then i apply the pod, it'state is still ContainerCreating, and describe information is
Events:
Type Reason Age From Message
Normal Scheduled 7s default-scheduler Successfully assigned default/pod-case-02 to master
Warning FailedCreatePodSandBox 0s kubelet, master Failed create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "5eef8919a1112abe8fdd108711c2629d77051cdf874ac714beea565c16774160" network for pod "pod-case-02": NetworkPlugin cni failed to set up pod "pod-case-02_default" network: Multus: Err adding pod to network "macvlan-conf-1": Multus: error in invoke Delegate add - "macvlan": "master" field is required. It specifies the host interface name to virtualize, failed to clean up sandbox container "5eef8919a1112abe8fdd108711c2629d77051cdf874ac714beea565c16774160" network for pod "pod-case-02": NetworkPlugin cni failed to teardown pod "pod-case-02_default" network: Multus: error in invoke Delegate del - "macvlan": "master" field is required. It specifies the host interface name to virtualize / Multus: error in invoke Conflist Del - "cbr0": error in getting result from DelNetworkList: failed to convert major version part "": strconv.Atoi: parsing "": invalid syntax]
Normal SandboxChanged 0s kubelet, master Pod sandbox changed, it will be killed and re-created. i understanding the "master" should use the default route interface ens2f2
[root@master ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 ens2f2
The text was updated successfully, but these errors were encountered:
Accroding to macvlan README, the master is optional,as follows:
master (string, optional): name of the host interface to enslave. Defaults to default route interface.
But when i delete the "master" in the yaml
[root@master ~]# cat macvlan-conf-1.yaml
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf-1
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"mode": "bridge",
"ipam": {
"ranges": [
[ {
"subnet": "192.168.2.0/24",
"rangeStart": "192.168.2.82",
"rangeEnd": "192.168.2.86",
"gateway": "192.168.2.4"
} ]
]
}
}'
[root@master ~]#
Then i apply the pod, it'state is still ContainerCreating, and describe information is
Events:
Type Reason Age From Message
Normal Scheduled 7s default-scheduler Successfully assigned default/pod-case-02 to master
Warning FailedCreatePodSandBox 0s kubelet, master Failed create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "5eef8919a1112abe8fdd108711c2629d77051cdf874ac714beea565c16774160" network for pod "pod-case-02": NetworkPlugin cni failed to set up pod "pod-case-02_default" network: Multus: Err adding pod to network "macvlan-conf-1": Multus: error in invoke Delegate add - "macvlan": "master" field is required. It specifies the host interface name to virtualize, failed to clean up sandbox container "5eef8919a1112abe8fdd108711c2629d77051cdf874ac714beea565c16774160" network for pod "pod-case-02": NetworkPlugin cni failed to teardown pod "pod-case-02_default" network: Multus: error in invoke Delegate del - "macvlan": "master" field is required. It specifies the host interface name to virtualize / Multus: error in invoke Conflist Del - "cbr0": error in getting result from DelNetworkList: failed to convert major version part "": strconv.Atoi: parsing "": invalid syntax]
Normal SandboxChanged 0s kubelet, master Pod sandbox changed, it will be killed and re-created.
i understanding the "master" should use the default route interface ens2f2
[root@master ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 ens2f2
The text was updated successfully, but these errors were encountered: