|
4 | 4 |
|
5 | 5 | :_mod-docs-content-type: CONCEPT
|
6 | 6 | [id="considerations-for-udn_{context}"]
|
7 |
| -= Best practices for UserDefinedNetwork |
| 7 | += Best practices for UserDefinedNetwork CRs |
8 | 8 |
|
9 |
| -Before setting up a `UserDefinedNetwork` (UDN) resource, you should consider the following information: |
| 9 | +Before setting up a `UserDefinedNetwork` custom resource (CR), you should consider the following information: |
10 | 10 |
|
11 | 11 | //These will not go live till 4.18 GA
|
12 | 12 | //* To eliminate errors and ensure connectivity, you should create a namespace scoped UDN CR before creating any workload in the namespace.
|
13 | 13 |
|
14 | 14 | //* You might want to allow access to any Kubernetes services on the cluster default network. By default, KAPI and DNS are accessible.
|
15 | 15 |
|
16 |
| -* `openshift-*` namespaces should not be used to set up a UDN. |
| 16 | +* `openshift-*` namespaces should not be used to set up a `UserDefinedNetwork` CR. |
17 | 17 |
|
18 | 18 | * `UserDefinedNetwork` CRs should not be created in the default namespace. This can result in no isolation and, as a result, could introduce security risks to the cluster.
|
19 | 19 |
|
20 | 20 | * For primary networks, the namespace used for the `UserDefinedNetwork` CR must include the `k8s.ovn.org/primary-user-defined-network` label. This label cannot be updated, and can only be added when the namespace is created. The following conditions apply with the `k8s.ovn.org/primary-user-defined-network` namespace label:
|
21 | 21 |
|
22 | 22 | ** If the namespace is missing the `k8s.ovn.org/primary-user-defined-network` label and a pod is created, the pod attaches itself to the default network.
|
23 | 23 |
|
24 |
| -** If the namespace is missing the `k8s.ovn.org/primary-user-defined-network` label and a primary UDN CR is created that matches the namespace, the UDN reports an error status and the network is not created. |
| 24 | +** If the namespace is missing the `k8s.ovn.org/primary-user-defined-network` label and a primary `UserDefinedNetwork` CR is created that matches the namespace, a status error is reported and the network is not created. |
25 | 25 |
|
26 |
| -** If the namespace is missing the `k8s.ovn.org/primary-user-defined-network` label and a primary UDN already exists, a pod in the namespace is created and attached to the default network. |
| 26 | +** If the namespace is missing the `k8s.ovn.org/primary-user-defined-network` label and a primary `UserDefinedNetwork` CR already exists, a pod in the namespace is created and attached to the default network. |
27 | 27 |
|
28 |
| -** If the namespace _has_ the label, and a primary UDN does not exist, a pod in the namespace is not created until the UDN is created. |
| 28 | +** If the namespace _has_ the label, and a primary `UserDefinedNetwork` CR does not exist, a pod in the namespace is not created until the `UserDefinedNetwork` CR is created. |
29 | 29 |
|
30 | 30 | * 2 masquerade IP addresses are required for user defined networks. You must reconfigure your masquerade subnet to be large enough to hold the required number of networks.
|
31 | 31 | +
|
32 | 32 | [IMPORTANT]
|
33 | 33 | ====
|
34 | 34 | * For {product-title} 4.17 and later, clusters use `169.254.0.0/17` for IPv4 and `fd69::/112` for IPv6 as the default masquerade subnet. These ranges should be avoided by users. For updated clusters, there is no change to the default masquerade subnet.
|
35 |
| -* Changing the cluster's masquerade subnet is unsupported after a user-defined network has been configured for a project. Attempting to modify the masquerade subnet after a UDN has been set up can disrupt the network connectivity and cause configuration issues. |
| 35 | +* Changing the cluster's masquerade subnet is unsupported after a user-defined network has been configured for a project. Attempting to modify the masquerade subnet after a `UserDefinedNetwork` CR has been set up can disrupt the network connectivity and cause configuration issues. |
36 | 36 | ====
|
37 | 37 | // May be something that is downstream only.
|
38 | 38 | //* No active primary UDN managed pod can also be a candidate for `v1.multus-cni.io/default-network`
|
39 | 39 |
|
40 |
| -* Ensure tenants are using the `UserDefinedNetwork` resource and not the `NetworkAttachmentDefinition` (NAD) resource. This can create security risks between tenants. |
| 40 | +* Ensure tenants are using the `UserDefinedNetwork` resource and not the `NetworkAttachmentDefinition` (NAD) CR. This can create security risks between tenants. |
41 | 41 |
|
42 |
| -* When creating network segmentation, you should only use the NAD resource if user-defined network segmentation cannot be completed using the UDN resource. |
| 42 | +* When creating network segmentation, you should only use the `NetworkAttachmentDefinition` CR if user-defined network segmentation cannot be completed using the `UserDefinedNetwork` CR. |
43 | 43 |
|
44 |
| -* The cluster subnet and services CIDR for a UDN cannot overlap with the default cluster subnet CIDR. OVN-Kubernetes network plugin uses `100.64.0.0/16` as the default network's join subnet, you must not use that value to configure a UDN `joinSubnets` field. If the default address values are used anywhere in the network for the cluster, you must override it by setting the `joinSubnets` field. For more information, see "Additional configuration details for a UserDefinedNetworks CR". |
45 |
| -
|
46 |
| -* The cluster subnet and services CIDR for a UDN cannot overlap with the default cluster subnet CIDR. OVN-Kubernetes network plugin uses `100.64.0.0/16` as the default join subnet for the network, you must not use that value to configure a UDN `joinSubnets` field. If the default address values are used anywhere in the network for the cluster you must override the default values by setting the `joinSubnets` field. For more information, see "Additional configuration details for a UserDefinedNetworks CR". |
| 44 | +* The cluster subnet and services CIDR for a `UserDefinedNetwork` CR cannot overlap with the default cluster subnet CIDR. OVN-Kubernetes network plugin uses `100.64.0.0/16` as the default join subnet for the network. You must not use that value to configure a `UserDefinedNetwork` CR's `joinSubnets` field. If the default address values are used anywhere in the network for the cluster you must override the default values by setting the `joinSubnets` field. For more information, see "Additional configuration details for user-defined networks". |
47 | 45 |
|
48 | 46 | * A layer 2 topology creates a virtual switch that is distributed across all nodes in a cluster. Virtual machines and pods connect to this virtual switch so that all these components can communicate with each other within the same subnet. If you decide not to specify a layer 2 subnet, then you must manually configure IP addresses for each pod in your cluster. When not specifying a layer 2 subnet, port security is limited to preventing Media Access Control (MAC) spoofing only, and does not include IP spoofing. A layer 2 topology creates a single broadcast domain that can be challenging in large network environments, whereby the topology might cause a broadcast storm that can degrade network performance.
|
49 | 47 |
|
|
0 commit comments