Skip to content

Commit c464f26

Browse files
authored
Merge pull request #88580 from stevsmit/open-default-port-udn-annotation
Adds annotation for opening default network ports on udn pods
2 parents 8e5519f + 478e170 commit c464f26

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//module included in the following assembly:
2+
//
3+
// * networking/multiple_networks/primary_networks/about-user-defined-networks.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="opening-default-network-ports-udn_{context}"]
7+
= Opening default network ports on user-defined network pods
8+
9+
By default, pods on a user-defined network are isolated from the default network. This means that default network pods, such as those running monitoring services (Prometheus or Alertmanager) or the {product-title} image registry, cannot initiate connections to UDN pods.
10+
11+
To allow default network pods to connect to a user-defined network pod, you can use the `k8s.ovn.org/open-default-ports` annotation. This annotation opens specific ports on the user-defined network pod for access from the default network.
12+
13+
The following pod specification allows incoming TCP connections on port `80` and UDP traffic on port `53` from the default network:
14+
[source,yaml]
15+
----
16+
apiVersion: v1
17+
kind: Pod
18+
metadata:
19+
annotations:
20+
k8s.ovn.org/open-default-ports: |
21+
- protocol: tcp
22+
port: 80
23+
- protocol: udp
24+
port: 53
25+
# ...
26+
----
27+
28+
[NOTE]
29+
====
30+
Open ports are accessible on the pod's default network IP, not its UDN network IP.
31+
====

networking/multiple_networks/primary_networks/about-user-defined-networks.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ include::modules/nw-udn-cr.adoc[leveloffset=+1]
6565
//Explanation of optional config details
6666
include::modules/nw-udn-additional-config-details.adoc[leveloffset=+1]
6767

68+
include::modules/opening-default-network-ports-udn.adoc[leveloffset=+1]
69+
6870
//Support matrix for UDN
6971
//include::modules
7072

0 commit comments

Comments
 (0)