Receiving inbound unicast UDP traffic to Multus network interface #1280
Closed
dockerised
started this conversation in
General
Replies: 2 comments
-
Update: I managed to find a way to correct the iptable entry on the host using a custom Endpoint, shown below, still no traffic coming through. apiVersion: v1
kind: Service
metadata:
name: sriov-test
namespace: hpsample
spec:
type: NodePort
ports:
- port: 30003
targetPort: 30003
protocol: UDP
nodePort: 30003
---
apiVersion: v1
kind: Endpoints
metadata:
name: sriov-test
namespace: hpsample
subsets:
- addresses:
- ip: "10.10.5.2" # This is IP of the secondary multus interface
ports:
- port: 30003
protocol: UDP |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is now working for me, the final solution was to remove the
sudo ip route del 10.10.5.0/24
sudo ip route add 10.10.5.0/24 dev ens2f0np0 192.168.33.111 (UDP sender) sudo ip route del 10.10.5.0/24 via 192.168.33.163
sudo ip route add 10.10.5.0/24 via 192.168.33.163
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: unicast-ipvlan
namespace: hpsample
spec:
config: '{
"cniVersion": "0.3.0",
"type": "ipvlan",
"master": "ens2f0np0",
"mode": "l2",
"ipam": {
"type": "host-local",
"subnet": "10.10.5.0/24",
"rangeStart": "10.10.5.2",
"rangeEnd": "10.10.5.80",
"gateway": "10.10.5.1",
"routes": [
{
"dst": "0.0.0.0/0",
"gw": "10.10.5.1"
}
]
}
}'
---
apiVersion: v1
kind: Pod
metadata:
name: sriov-test
namespace: hpsample
annotations:
# k8s.v1.cni.cncf.io/networks: unicast-ipvlan
k8s.v1.cni.cncf.io/networks: '[{ "name": "unicast-ipvlan", "ips": [ "10.10.5.10/32" ] }]'
labels:
app: net-tools
spec:
containers:
- image: george7522/net-tools:ubuntu
command: [ "/bin/sh", "-c" ]
args: ["sleep 1000000"]
imagePullPolicy: Always
name: ffplay
# resources:
# limits:
# intel.com/sriov_device_vmain: "1"
# requests:
# intel.com/sriov_device_vmain: "1"
securityContext:
privileged: true
securityContext:
privileged: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: sriov-test
namespace: hpsample
spec:
type: NodePort
ports:
- port: 30003
targetPort: 30003
protocol: UDP
nodePort: 30003
selector:
app: net-tools
--- |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Firstly thank you for all the development efforts on Multus!
I was wondering if someone could help me, I've been stuck on an issue for quite a while.
The high level objective is to send/receive Multicast and Unicast UDP traffic on a pod using a multus network interface.
I deploy a Multus network interface to a pod and am looking to direct UDP unicast traffic via my Nginx ingress controller (using NodePort/HostPort).
Outbound unicast UDP traffic from inside the Pod to outside the k8s cluster works just fine, the current issue i'm facing is with ingress Unicast traffic to my pod via a nodePort or HostPort. I tried assigning Multus networks to my ingress deployments but the iptables on the worker node still show the default eth0 routes.
Please see below for details:
net-attach-def.yaml
pod-and-service.yaml
K8s host ip tables output, showing only route table entries for default k8s network on 10.96 where 10.96.5.114 is eth0 of ipvlan-test pod
Any help would be greatly appreciated!!
Kind regards,
George
Beta Was this translation helpful? Give feedback.
All reactions