Skip to content

Commit 47169ff

Browse files
authored
Merge pull request #88115 from sjhala-ccs/cnv-54739
CNV-54739: UI procedure to create UDN
2 parents 8cda4c2 + a2b33bb commit 47169ff

8 files changed

+147
-9
lines changed

modules/virt-attaching-vm-to-primary-udn.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="virt-attaching-vm-to-primary-udn_{context}"]
7-
= Attaching a virtual machine to the primary user-defined network
7+
= Attaching a virtual machine to the primary user-defined network by using the CLI
88

99
You can connect a virtual machine (VM) to the primary user-defined network (UDN) by requesting the pod network attachment, and configuring the interface binding.
1010

modules/virt-creating-a-primary-cluster-udn.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="virt-creating-a-primary-cluster-udn_{context}"]
7-
= Creating a primary cluster-scoped user-defined network
7+
= Creating a primary cluster-scoped user-defined network by using the CLI
88

9-
You can connect multiple namespaces to the same primary user-defined network (UDN) to achieve native tenant isolation.
9+
You can connect multiple namespaces to the same primary user-defined network (UDN) to achieve native tenant isolation by using the CLI.
1010

1111
.Prerequisites
1212
. You have access to the cluster as a user with `cluster-admin` privileges.
1313
. You have installed the OpenShift CLI (`oc`).
14-
. You have created multiple namespaces with the `k8s.ovn.org/primary-user-defined-network` label.
1514

1615
.Procedure
1716
. Create a `ClusterUserDefinedNetwork` object to specify the custom network configuration:

modules/virt-creating-a-primary-udn.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="virt-creating-a-primary-udn_{context}"]
7-
= Creating a primary namespace-scoped user-defined network
7+
= Creating a primary namespace-scoped user-defined network by using the CLI
88

9-
You can create an isolated primary network in your project namespace. You must use the OVN-Kubernetes layer 2 topology and enable persistent IP address allocation in the user-defined network (UDN) configuration to ensure VM live migration support.
9+
You can create an isolated primary network in your project namespace by using the CLI. You must use the OVN-Kubernetes layer 2 topology and enable persistent IP address allocation in the user-defined network (UDN) configuration to ensure VM live migration support.
1010

1111
.Prerequisites
1212
. You have installed the OpenShift CLI (`oc`).
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-creating-primary-cluster-udn-web_{context}"]
7+
= Creating a primary cluster-scoped user-defined network by using the web console
8+
9+
You can connect multiple namespaces to the same primary user-defined network (UDN) by creating a `ClusterUserDefinedNetwork` custom resource in the {product-title} web console.
10+
11+
.Prerequisites
12+
* You have access to the {product-title} web console as a user with `cluster-admin` permissions.
13+
14+
.Procedure
15+
. From the *Administrator* perspective, click *Networking* -> *UserDefinedNetworks*.
16+
17+
. From the *Create* list, select *ClusterUserDefinedNetwork*.
18+
19+
. In the *Name* field, specify a name for the cluster-scoped UDN.
20+
21+
. Specify a value in the *Subnet* field.
22+
23+
. In the *Project(s) Match Labels* field, add the appropriate labels to select namespaces that the cluster UDN applies to.
24+
25+
. Click *Create*. The cluster-scoped UDN serves as the default primary network for pods and virtual machines located in namespaces that contain the labels that you specified in step 5.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-creating-primary-udn-web_{context}"]
7+
= Creating a primary namespace-scoped user-defined network by using the web console
8+
9+
You can create an isolated primary network in your project namespace by creating a `UserDefinedNetwork` custom resource in the {product-title} web console.
10+
11+
.Prerequisites
12+
* You have access to the {product-title} web console as a user with `cluster-admin` permissions.
13+
* You have created a namespace and applied the `k8s.ovn.org/primary-user-defined-network` label. For more information, see "Creating a namespace for user-defined networks by using the web console".
14+
15+
.Procedure
16+
. From the *Administrator* perspective, click *Networking* -> *UserDefinedNetworks*.
17+
18+
. Click *Create UserDefinedNetwork*.
19+
20+
. From the *Project name* list, select the namespace that you previously created.
21+
22+
. Specify a value in the *Subnet* field.
23+
24+
. Click *Create*. The user-defined network serves as the default primary network for pods and virtual machines that you create in this namespace.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-creating-udn-namespace-cli_{context}"]
7+
= Creating a namespace for user-defined networks by using the CLI
8+
9+
You can create a namespace to be used with primary user-defined networks (UDNs) by using the CLI.
10+
11+
.Prerequisites
12+
* You have access to the cluster as a user with `cluster-admin` permissions.
13+
* You have installed the OpenShift CLI (`oc`).
14+
15+
16+
.Procedure
17+
. Create a `Namespace` object as a YAML file similar to the following example:
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: v1
22+
kind: Namespace
23+
metadata:
24+
name: udn_namespace
25+
labels:
26+
k8s.ovn.org/primary-user-defined-network: "" # <1>
27+
# ...
28+
----
29+
<1> This label is required for the namespace to be associated with a UDN. If the namespace is to be used with an existing cluster UDN, you must also add the appropriate labels that are defined in the `spec.namespaceSelector` field of the `ClusterUserDefinedNetwork` custom resource.
30+
31+
. Apply the `Namespace` manifest by running the following command:
32+
+
33+
[source, terminal]
34+
----
35+
oc apply -f <filename>.yaml
36+
----
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-creating-udn-namespace-web_{context}"]
7+
= Creating a namespace for user-defined networks by using the web console
8+
9+
You can create a namespace to be used with primary user-defined networks (UDNs) by using the {product-title} web console.
10+
11+
.Prerequisites
12+
* Log in to the {product-title} web console as a user with `cluster-admin` permissions.
13+
14+
15+
.Procedure
16+
. From the *Administrator* perspective, click *Administration* -> *Namespaces*.
17+
18+
. Click *Create Namespace*.
19+
20+
. In the *Name* field, specify a name for the namespace. The name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character.
21+
22+
. In the *Labels* field, add the `k8s.ovn.org/primary-user-defined-network` label.
23+
24+
. Optional: If the namespace is to be used with an existing cluster-scoped UDN, add the appropriate labels as defined in the `spec.namespaceSelector` field in the `ClusterUserDefinedNetwork` custom resource.
25+
26+
. Optional: Specify a default network policy.
27+
28+
. Click *Create* to create the namespace.

virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can connect a virtual machine (VM) to a user-defined network (UDN) on the VM's primary interface. The primary user-defined network replaces the default pod network in your specified namespace. Unlike the pod network, you can define the primary UDN per project, where each project can use its specific subnet and topology.
9+
You can connect a virtual machine (VM) to a user-defined network (UDN) on the VM's primary interface by using the {product-title} web console or the CLI. The primary user-defined network replaces the default pod network in your specified namespace. Unlike the pod network, you can define the primary UDN per project, where each project can use its specific subnet and topology.
1010

1111
{VirtProductName} supports the namespace-scoped `UserDefinedNetwork` and the cluster-scoped `ClusterUserDefinedNetwork` custom resource definitions (CRD).
1212

@@ -33,9 +33,35 @@ You must consider the following limitations before implementing a primary UDN:
3333
{VirtProductName} currently does not support secondary user-defined networks.
3434
====
3535

36-
include::modules/virt-creating-a-primary-udn.adoc[leveloffset=+1]
36+
[id="creating-primary-udn-web_{context}"]
37+
== Creating a primary user-defined network by using the web console
3738

38-
include::modules/virt-creating-a-primary-cluster-udn.adoc[leveloffset=+1]
39+
You can use the {product-title} web console to create a primary namespace-scoped `UserDefinedNetwork` or a cluster-scoped `ClusterUserDefinedNetwork` CRD. The UDN serves as the default primary network for pods and VMs that you create in namespaces associated with the network.
40+
41+
include::modules/virt-creating-udn-namespace-web.adoc[leveloffset=+2]
42+
43+
include::modules/virt-creating-primary-udn-web.adoc[leveloffset=+2]
44+
45+
include::modules/virt-creating-primary-cluster-udn-web.adoc[leveloffset=+2]
46+
47+
[id="next-steps-web_{context}"]
48+
.Next steps
49+
* xref:../../virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc#virt-creating-udn-namespace-web_virt-connecting-vm-to-primary-udn[Create namespaces that are associated with the cluster-scoped UDN]
50+
51+
[id="creating-primary-udn-cli_{context}"]
52+
== Creating a primary user-defined network by using the CLI
53+
54+
You can create a primary `UserDefinedNetwork` or `ClusterUserDefinedNetwork` CRD by using the CLI.
55+
56+
include::modules/virt-creating-udn-namespace-cli.adoc[leveloffset=+2]
57+
58+
include::modules/virt-creating-a-primary-udn.adoc[leveloffset=+2]
59+
60+
include::modules/virt-creating-a-primary-cluster-udn.adoc[leveloffset=+2]
61+
62+
[id="next-steps-cli_{context}"]
63+
.Next steps
64+
* xref:../../virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc#virt-creating-udn-namespace-cli_virt-connecting-vm-to-primary-udn[Create namespaces that are associated with the cluster-scoped UDN]
3965

4066
include::modules/virt-attaching-vm-to-primary-udn.adoc[leveloffset=+1]
4167

0 commit comments

Comments
 (0)