Skip to content

gRPC UDP port forwarding doesn't work #3152

Closed as not planned
Closed as not planned
@brandonros

Description

@brandonros

Description

    # provision VM
    echo "provisioning VM"
    export LIMA_SSH_PORT_FORWARDER=false
    limactl start --tty=false --name debian-k3s ./deploy/vm/debian-k3s.yaml
portForwards:
- guestPort: 6443
  hostPort: 6443
  guestIP: "127.0.0.1"
  hostIP: "127.0.0.1"
  proto: tcp
- guestPort: 443
  hostPort: 443
  guestIP: "127.0.0.1"
  hostIP: "127.0.0.1"
  proto: tcp
- guestPort: 80
  hostPort: 80
  guestIP: "127.0.0.1"
  hostIP: "127.0.0.1"
  proto: tcp
- guestPort: 30000
  hostPort: 30000
  guestIP: "0.0.0.0"
  hostIP: "0.0.0.0"
  proto: udp

From host:

 while [ 1 ]; do   echo "test.metric:1|c" | nc -4u -v localhost 30000;   sleep 1; done

From guest:

brandon@lima-debian-k3s:~$ sudo tcpdump -i any -vv -n 'udp port 30000'
tcpdump: data link type LINUX_SLL2
tcpdump: listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
# traffic never arrives

I don't know if it's port collision because I was also trying to do this to fully "connect the chain"

apiVersion: v1
kind: Service
metadata:
  name: graphite-statsd
  namespace: graphite
spec:
  type: NodePort
  ports:
    - name: statsd
      port: 8125
      targetPort: 8125
      nodePort: 30000
      protocol: UDP
  selector:
    app.kubernetes.io/name: graphite
    app.kubernetes.io/instance: graphite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions