I have one cluster with 3 pods and 3 services (first, second and third).
my services are:
aks-helloworld-first cluster ip:10.67.251.251 ,
aks-helloworld-sec cluster ip:10.67.248.67 ,
aks-helloworld-third cluster ip: 10.67.240.154.
the pods are:
aks-helloworld-sec selector: app=helloworld-sec
aks-helloworld-third selector: app=helloworld-third
I added the following virtual service:
kind: VirtualService metadata: name: aks-helloworld-first-route spec: hosts: - aks-helloworld-first http: - match: - sourceLabels: app: helloworld-third route: - destination: host: aks-helloworld-first
I expected to be able to access to “first” only through “third”. But when trying to access to “first” through “second” I was able to do it as well.
i run kubectl exec to the “second” pod and run : curl -v http://10.67.251.251/
i was able to access the “first” pod
What am I missing?