<p>could you please support me in understanding how to configure the NetworkPolicy in order to set rule, that only predefined user's role may have access for specific pod (or service)?</p>

<p>I have begun with Kubernetes and read "Kebernetes in action", but didn't found any description how to do it.  In general, this request is Authorisation task and only solution (i suppose) is to apply some kind of   CustomResourceDefinition and create my own controller for manage the behaviour of CustomNetworkPolicy. Am I on right way, or is there any appropriate solution?</p>

<p>My microservices current equipped with authorisation on application level, but i need to move this task on cluster level. One of a reason is, i.e. I can orchestrate access of users without to change the source code of microservices.</p>

<p>I will be very thankful for some example or clarification</p>

student.cologne
<p>Using NetworkPolicy you can only manage the incoming and outgoing traffic to/from pods. For authorization, you can leverage service mesh which provides many more functionalities without changing your source code. The most famous one is istio (<a href="https://istio.io/docs/tasks/security/authorization/authz-http/" rel="nofollow noreferrer">https://istio.io/docs/tasks/security/authorization/authz-http/</a>), you can check more of them.</p>
