Why do Azure container exposed ports receive connections from the k8s agent pool?

UVProtector 1 Reputation point
2020-08-14T04:46:46.963+00:00

Hi, I have a docker image which contains a socket server which listens on port 50000. I created an Azure container instance and configured it to expose port 50000 so that it can listen for connection from am external socket client.

Since the socket server is very specific it only accept one connection but it seem that instead of waiting for a connection from the external client, it gets a connection from k8s-agentpool1-a02aue0l-1.internal.cloudapp.net as soon as the socket server starts which then means that it can no longer listen for the external client app.

My questions are:

  1. why does it do this?
  2. is there a way of stopping it?
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
670 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,901 Reputation points Microsoft Employee
    2020-08-17T17:13:17.88+00:00

    @UVProtector Thank you for your patience over the matter .

    I had a discussion internally and got to know that there is a possibility that is the liveness probe checking to make sure that the container is up. It seems pretty unusual to have a server that can only accept a single connection.

    I would recommend changing the code to handle multiple connections, but if that's not possible you can null out the liveness and readiness probes and I believe that request should stop.

    Hope it helps!!!

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics

    1 person found this answer helpful.