ahmetb / kubernetes-network-policy-recipes

Example recipes for Kubernetes Network Policies that you can just copy paste

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

block communication to specific pod

kashifali94 opened this issue · comments

so can use guide me in this particular case allow pod to communicate to all of the others pod except one pod and can we use ip instead of pods label ?

I'm not sure I understand this. Can you take more time to explain it better?

@ahmetb yes sure!
here is the case in network policies of kubernetes and they used pods label right for example app: test
so can we use ip of the pod instead of pod match label.
and 2nd things is i have a case where i want to block communication between 2 pods like i have a pod A and pod B so pod A cannot communicate with pod B but pod A can communicate to rest of the pods in a default namespace so how can i achieve this ?

I think what you're looking for is explained in the examples in this repo. Please read them carefully, if not ask your questions on kubernetes-user@ google groups list or Stack Overflow. I'm afraid I cannot provide further support.