Cluster information:
Kubernetes version: 1.29.0
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: CentOS 7
CNI and version: Calico
CRI and version: Containerd
Hello everyone, I hope you are well
I’m having a problem when trying to open communication between my applications within Kubernetes. Currently client-server communicate through socket.io, but when adding it to kubernetes, I am having the following problem: server and client connect, I can know that they do from the server log, but no event exchange occurs!
I’ve searched everywhere on the internet, but the solutions I found were for GKE, and I’m running a cluster created by kubeadm, so they’re not usable. Has anyone gone through something similar to this?
Some questions I can ask:
-
Server pod is running normally, it responds to http requests through ingress
-
I am using ingress-nginx v1.10.0 to expose my services
-
My application is: Client made in Angular and server in Spring boot, talking through socket.io.
-
There is nothing special in the services and deployments manifest declaration, just the basics for it to work.
-
My ingress manifest:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dpiot
annotations:
#nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/websocket-services: dpiot-back-service
spec:
ingressClassName: nginx
rules:
- host: dpiotfront.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: dpiot-front-service
port:
number: 80
- path: /socket.io/
pathType: ImplementationSpecific
backend:
service:
name: dpiot-back-service
port:
number: 80
I’ve been searching for more than hours and no results, I’m running out of options, if anyone can help me I would be very grateful. Any additional information you need for something, just ask!