A Network policy defines the inbound and outbound access to/from a Service. Ingress rules specify the Service or the hosts in the CIDR range that can access a particular service while the Egress specifies the Services or the hosts in the CIDR range that a particular service can access.
Steps to create a Network Policy
1.In the left navigation panel, click on Service Policies and choose Network Policies
2. Select Create new policy to create a new Network Policy
3. Provide the ingress and egress rules and select Create a new network policy.
In the example below, the esearch service can be accessed by the service kibana on port 9200,
In the example below, the esearch service can access other services listening on port 8080 in the CIDR range 192.168.2.0/24.