I have coded a simple server socket app listening on port 13345 and a client-side app.
Both are running fine locally on my computer.
When deployed into Azure Kubernetes Service, the server app starts fine.
Then I expose the app which is called "event-bus" using this command:
kubectl expose deployment event-bus --type=LoadBalancer
And from then onward, the app keeps getting hit every second with incoming connections that are not from me:
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.244.1.1
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.244.1.1:63870
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.240.0.6
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.240.0.6:51200
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.240.0.5
Mar 17, 2022 10:16:09 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.240.0.5:26748
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.244.1.1
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.244.1.1:41947
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.240.0.6
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.240.0.6:9574
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.MessageExchangeService main
INFO: Accepted an incoming connection from 10.240.0.5
Mar 17, 2022 10:16:15 PM com.acme.messaging.server.ServerSocketConnectionThread run
INFO: Waiting for incoming data from remote client /10.240.0.5:40369
...
These connections cause an unwanted usage of CPU/network resources.
Do you know what it is and how it can be disabled?
I want to expose the app only to eventually connect to it via socket myself, not to have any automated thing hitting it several times per second.