In a kubernetes cluster, if I connect to a port of a given Pod ip address, which container inside the Pod am I connecting to?

Solution 1:

All containers in the Pod share the same Network namespace[1]. Only one container will be able to bind a service to given port - so by choosing a port you are picking the target container.

[1] Linux kernel namespace, not to be confused with Kubernetes namespaces.