You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nw-networkpolicy-optimize-ovn.adoc
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -104,11 +104,11 @@ spec:
104
104
You can apply this optimization when only multiple selectors are expressed as one. In cases where selectors are based on different labels, it may not be possible to apply this optimization. In those cases, consider applying some new labels for network policy optimization specifically.
105
105
106
106
[id="nw-networkpolicy-external-ip-ovn_{context}"]
107
-
== NetworkPolicies and external IPs in OVN-Kubernetes
107
+
== NetworkPolicy CR and external IPs in OVN-Kubernetes
108
108
109
-
In OVN-Kubernetes, `NetworkPolicies` enforce strict isolation rules. If a service is exposed using an external IP, `NetworkPolicies` can block access from other namespaces unless explicitly configured.
109
+
In OVN-Kubernetes, the `NetworkPolicy` custom resource (CR) enforces strict isolation rules. If a service is exposed using an external IP, a network policy can block access from other namespaces unless explicitly configured to allow traffic.
110
110
111
-
To allow access to external IPs across namespaces, create a `NetworkPolicy` that explicitly permits ingress from the required namespaces and ensures traffic is allowed to the designated service ports. Without allowing traffic to the required ports, access might still be restricted.
111
+
To allow access to external IPs across namespaces, create a `NetworkPolicy` CR that explicitly permits ingress from the required namespaces and ensures traffic is allowed to the designated service ports. Without allowing traffic to the required ports, access might still be restricted.
112
112
113
113
.Example output
114
114
[source,yaml]
@@ -117,7 +117,7 @@ To allow access to external IPs across namespaces, create a `NetworkPolicy` that
117
117
kind: NetworkPolicy
118
118
metadata:
119
119
annotations:
120
-
name: <policy_name> <1>
120
+
name: <policy_name>
121
121
namespace: openshift-ingress
122
122
spec:
123
123
ingress:
@@ -130,12 +130,14 @@ To allow access to external IPs across namespaces, create a `NetworkPolicy` that
130
130
- from:
131
131
- namespaceSelector:
132
132
matchLabels:
133
-
kubernetes.io/metadata.name: <namespace_name> <2>
133
+
kubernetes.io/metadata.name: <my_namespace>
134
134
podSelector: {}
135
135
policyTypes:
136
136
- Ingress
137
137
----
138
-
<1> Specify the policy name.
139
-
<2> Specify the namespace name.
138
+
+
139
+
Where::
140
+
`<policy_name>`: Specifies your name for the policy.
141
+
`<my_namespace>`: Specifies the name of the namespace where the policy is deployed.
Understanding the fundamentals of networking in {product-title} ensures efficient and secure communication within your clusters and is essential for effective network administration. Key elements of networking in your environment include understanding how pods and services communicate, the role of IP addresses, and the use of DNS for service discovery.
9
+
Understanding the fundamentals of networking in {product-title} ensures efficient and secure communication within your clusters and is essential for effective network administration. Key elements of networking in your environment include understanding how pods and services communicate, the role of IP addresses, and the use of DNS for service discovery.
0 commit comments