netstat showing foreign ports as kubernetes:port. What does this mean?

That happens because of the way netstat renders output. It has nothing to do with actual Kubernetes.

I have Docker Desktop for Windows and it adds this to the hosts file:

# Added by Docker Desktop host.docker.internal gateway.docker.internal
# To allow the same kube context to work on the host and the container: kubernetes.docker.internal
# End of section

There is a record which maps to kubernetes.docker.internal. When netstat renders its output, it resolves foreign address and it looks at the hosts file and sees this record. It says kubernetes and that is what you see in the console. You can try to change it to tomato.docker.internal

With this, netstat will print:

  Proto  Local Address          Foreign Address        State
  TCP         tomato:6941            ESTABLISHED
  TCP         tomato:6940            ESTABLISHED
  TCP         tomato:40347           ESTABLISHED
  TCP         tomato:40348           ESTABLISHED
  TCP         tomato:40349           ESTABLISHED

So what actually happens is there are connections from localhost to localhost (netstat -b will show apps that create them). Nothing to do with Kubernetes.

It seems that Windows docker changed your hosts file. So, if you want to get rid of these connections, just comment out the corresponding lines in the hosts file.

The hosts file on Windows 10 is located in C:\Windows\System32\drivers\etc and the records may look something like kubernetes.docker.internal. I am pretty sure it will disrupt your docker service on Windows (yet, I am not an expert), so don't forget to uncomment these lines whenever you need to get the docker service back.