Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions modules/virt-creating-udn-namespace-cli.adoc
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
// Module included in the following assemblies:
//
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc
// * virt/vm_networking/virt-connecting-vm-to-primary-udn.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-creating-udn-namespace-cli_{context}"]
:_mod-docs-content-type: PROCEDURE
[id="virt-creating-udn-namespace-cli_{context}"]
= Creating a namespace for user-defined networks by using the CLI

You can create a namespace to be used with primary user-defined networks (UDNs) by using the CLI.
You can create a namespace to be used with primary user-defined networks (UDNs) by using the {oc-first}.

.Prerequisites
* You have access to the cluster as a user with `cluster-admin` permissions.
* You have installed the OpenShift CLI (`oc`).

* You have access to the cluster as a user with `cluster-admin` permissions.
* You have installed the {oc-first}.

.Procedure

. Create a `Namespace` object as a YAML file similar to the following example:
+
[source,yaml]
----
apiVersion: v1
kind: Namespace
metadata:
name: udn_namespace
name: my-namespace
labels:
k8s.ovn.org/primary-user-defined-network: "" # <1>
# ...
Expand All @@ -32,5 +33,5 @@ metadata:
+
[source, terminal]
----
oc apply -f <filename>.yaml
----
$ oc apply -f <filename>.yaml
----