Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 8. Network Policy
As an administrator, you can create a network policy for the
netobserv
8.1. Configuring network policy by using the FlowCollector custom resource Link kopierenLink in die Zwischenablage kopiert!
You can set up ingress and egress network policies to control pod traffic. This enhances security and collects only the network flow data you need. This reduces noise, supports compliance, and improves visibility into network communication.
You can configure the
FlowCollector
spec.NetworkPolicy.enable
true
If you have installed Loki, Kafka or any exporter in a different namespace that also has a network policy, you must ensure that the network observability components can communicate with them. Consider the following about your setup:
-
Connection to Loki (as defined in the CR
FlowCollectorparameter)spec.loki -
Connection to Kafka (as defined in the CR
FlowCollectorparameter)spec.kafka -
Connection to any exporter (as defined in FlowCollector CR parameter)
spec.exporters -
If you are using Loki and including it in the policy target, connection to an external object storage (as defined in your related secret)
LokiStack
Procedure
-
In the web console, go to Operators
Installed Operators page. - Under the Provided APIs heading for Network Observability, select Flow Collector.
- Select cluster then select the YAML tab.
Configure the
CR. A sample configuration is as follows:FlowCollectorExample
FlowCollectorCR for network policyapiVersion: flows.netobserv.io/v1beta2 kind: FlowCollector metadata: name: cluster spec: namespace: netobserv networkPolicy: enable: true1 additionalNamespaces: ["openshift-console", "openshift-monitoring"]2 # ...