Processes failed to communicate inside the container in a pod using kind/kubectl

I’ve been spending for a week on this issue. I can’t seem to grasp the idea why it is not working. So, I have one process which is python and other process is godot. They are in the same container and this container is also in the single pod. bridge and godot share the socket called WebSocket and they listen on 9050. 8080 is the live-server where it broadcasts the html (godot).

For some reason, it couldn’t find the 0.0.0.0:9050. Godot has ws://127.0.0.1:9050 and the python side has 0.0.0.0:9050

This method works very well in docker, local, or even multi-pc. I wanted to load it inside the Kubernetes. For some reason, they are not able to find each other. I’ve been digging into network a lot and it seems that it’s all there. I’m not sure why it couldn’t find 0.0.0.0:9050

I wonder if I made some wrong modify on my deployment and service? See here:

apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: kompose convert -f feagi.yml
    kompose.version: 1.27.0 (HEAD)
  creationTimestamp: null
  labels:
    io.kompose.service: godot
  name: godot
spec:
  ports:
    - name: "6081"
      port: 6081
      targetPort: 8080
    - name: websockets
      protocol: TCP
      port: 9050
      targetPort: 9050
  selector:
    io.kompose.service: godot
status:
  loadBalancer: {}

Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: godot
  labels:
    io.kompose.service: godot
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: godot
  template:
    metadata:
      labels:
        io.kompose.service: godot
        io.kompose.network/net: "true"
    spec:
      containers:
      - name: godot
        image: godot
        imagePullPolicy: Never
        env:
        - name: k8_server
          value: "0.0.0.0"
        ports:
        - containerPort: 8080
        - containerPort: 6081
        - containerPort: 9050

Here is what I did in commands:

1. kompose convert -f yaml
2. kind create cluster
3. kind load docker-image godot
4. kubectl apply -f deploy/
5. kubectl port-forward --address (computer'slocal_IP) pod_name 8080

Do you have any good suggestion? It’s only WebSocket that having hard time while API, HTML, or container are doing well. I had few people to try and help me out, but they said they don’t see anything wrong with my setup. I’m hoping to see if you see the error already here.

Cluster information:

Kubernetes version: v4.5.7
Cloud being used: Not yet
Host OS: Apple M1

I’m Having the same issue with godot + kubernetes, I added nginx-ingress to serve everything using a custom certificate like described in this post: https://godotengine.org/en/article/websocket-ssl-testing-html5-export but in godot 4 and still not working.
Did you get any progress on this?