Hi,
I’m encountering an issue when trying to allocate an Ethernet interface to two Pods using the MacvlanNetwork CRD.
Host Environment
Both servers have an eth1
interface and can ping each other successfully.
YAML for Creating MacvlanNetwork CRD
apiVersion: mellanox.com/v1alpha1
kind: MacvlanNetwork
metadata:
name: macvlan-eth1
spec:
networkNamespace: jsh
master: eth1
mode: bridge
mtu: 1500
ipam: |
{
"type": "whereabouts",
"datastore": "kubernetes",
"kubernetes": {
"kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
},
"log_file" : "/var/log/whereabouts.log",
"log_level" : "info",
"range": "192.168.10.128/26"
}
YAML for Creating Pod
apiVersion: v1
kind: Pod
metadata:
name: test-pod-7
namespace: jsh
annotations:
k8s.v1.cni.cncf.io/networks: |
[
{ "name": "macvlan-eth1", "interface": "eth1" }
]
spec:
containers:
- name: app
...
securityContext:
capabilities:
add: [ "IPC_LOCK" ]
Inside the Pod
Verified the assigned interface and performed ping tests using kubectl exec
.
Despite these configurations, the two Pods cannot ping each other.
The interfaces seem to be correctly assigned, but communication between the Pods is not working.
Could anyone provide guidance on how to resolve this issue?
Any help would be greatly appreciated!
Thank you in advance.