0

I'm trying to test samplicator in Kubernetes using MinuKube running under VirtualBox on Ubuntu but am having trouble.

I'm not sure if the problem is with accessing the process via the correct ports or whether I have a problem with the Samplicator image and/or process.

I am using robcowart's docker image of samplicator and have created deployment and services files as follows:

deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.26.1 (a9d05d509)
  creationTimestamp: null
  labels:
    io.kompose.service: samplicator-loopback-dupe-3160t03161and3162
  name: samplicator-loopback-dupe
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: samplicator-loopback-dupe-3160t03161and3162
  strategy: {}
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.26.1 (a9d05d509)
      creationTimestamp: null
      labels:
        io.kompose.service: samplicator-loopback-dupe-3160t03161and3162
    spec:
      containers:
        - args:
            - -s
            - 0.0.0.0
            - -p
            - "3160"
            - -S
            - -d
            - "0"
            - 192.168.59.1/3161
            - 192.168.59.1/3162
          image: robcowart/samplicator:1.0.1_1.3.8rc1
          name: samplicator-loopback-dupe-3160to3161and3162
          ports:
            - containerPort: 3160
          resources: {}
      restartPolicy: Always
status: {}

service:

apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.26.1 (a9d05d509)
  creationTimestamp: null
  labels:
    io.kompose.service: samplicator-loopback-dupe-3160t03161and3162
  name: samplicator-loopback-dupe-3160t03161and3162
spec:
  ports:
    - name: "receiver"
      port: 3160
      targetPort: 3160
      protocol: UDP
    - name: "dupe1"
      port: 3161
      targetPort: 3161
      protocol: UDP
    - name: "dupe2"
      port: 3162
      targetPort: 3162
      protocol: UDP
  selector:
    io.kompose.service: samplicator-loopback-dupe-3160t03161and3162
status:
  loadBalancer: {}

The two yaml files were created initially with kompose from info on the docker image github page, but the service.yaml didn't work at all so I had to tweak that manually until it seemed to work, or at least be accepted as valid by kubectl.

As you may be able deduce, my intention for testing is to send UDP packets to the samplicator process on port 3160 and to receive the duplicated packets on ports 3161 and 3162 on my local machine.

192.168.59.1 is the vBox interface address on my host machine, but I have also tried the host machines 'actual' IP address as well.

To test I am using netcat to send text to port 3160 interactively (netcat -u localhost 3160). I have tried this on my local machine with samplicator running locally and I can receive the duplicated packets with netcat -u -l 3161 and netcat -u -l 3162 no problem.

When I try to send to the k8s instance of samplicator, though, nothing happens and I am struggling to work out how to debug the problem.

My first problem is that I am not confident I am sending the packets to the correct IP address - the service I have created to expose the ports has a Cluster IP associated with it so I tried that first. I have also used minikube ssh to access the cluster and ran ifconfig there to look for other IP addresses.

I've even tried just running kubectl expose deployment samplicator-loopback-dupe and used the IP listed for that service in the MiniKube dashboard.. still no dice (though that only lists port 3160 as being exposed, so even more confusing).

All in all I'm just stuck where to go next... I'm new to k8s so the whole networking side of things and terminology is making searching for answers pretty difficult.

Fat Monk
  • 101
  • 2

0 Answers0