Skip to content

Commit 7d5cd32

Browse files
author
Tim Bannister
committed
Tidy documentation on NetworkPolicy endPort field
1 parent 60935ce commit 7d5cd32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/en/docs/concepts/services-networking/network-policies.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ You must be using a {{< glossary_tooltip text="CNI" term_id="cni" >}} plugin tha
227227

228228
When writing a NetworkPolicy, you can target a range of ports instead of a single port.
229229

230-
This is achiveable with the usage of the `endPort` field, as the following example:
230+
This is achievable with the usage of the `endPort` field, as the following example:
231231

232232
```yaml
233233
apiVersion: networking.k8s.io/v1
@@ -251,11 +251,11 @@ spec:
251251
endPort: 32768
252252
```
253253

254-
The above rule will allow a Pod with label `db` on the namespace `default` to communicate with any IP within the range `10.0.0.0/24` if the target port is between the range 32000 and 32768.
254+
The above rule allows any Pod with label `db` on the namespace `default` to communicate with any IP within the range `10.0.0.0/24` over TCP, provided that the target port is between the range 32000 and 32768.
255255

256256
The following restrictions apply when using this field:
257-
* As an alpha feature, this is disabled by default. To enable endPort field at a cluster level, you (or your cluster administrator) will need to enable the `NetworkPolicyEndPort` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `--feature-gates=NetworkPolicyEndPort=true,…`.
258-
* The `endPort` field must be equal than or greater to `port` field.
257+
* As an alpha feature, this is disabled by default. To enable the `endPort` field at a cluster level, you (or your cluster administrator) need to enable the `NetworkPolicyEndPort` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `--feature-gates=NetworkPolicyEndPort=true,…`.
258+
* The `endPort` field must be equal than or greater to the `port` field.
259259
* `endPort` can only be defined if `port` is also defined.
260260
* Both ports must be numeric.
261261

0 commit comments

Comments
 (0)