I have 2 namespaces and 1 pod, 1 service running in each.
Example
Namespace 1: default
Pod: pod1
Service: pod1service
Namespace 2: test
Pod: pod1
Service: pod1service
I can actually make HTTP request from namespace2 pod to namespace1 pod.
curl -H "Content-Type: application/json" -X GET http://pod1service.default.svc.cluster.local/some/api
How do i disable communication between 2 differet namespaces?
You need to configure network policies. For that to work you also need to use a network addon that supports policies.