mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/multiple-networks/remove-additional-network.adoc
|
|
|
|
[id="nw-multus-delete-network_{context}"]
|
|
= Removing an additional network attachment definition
|
|
|
|
As a cluster administrator, you can remove an additional network from your
|
|
{product-title} cluster. The additional network is not removed from any Pods it
|
|
is attached to.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
In {product-title} 4.2.0 you must manually delete the additional network CR after removing it from the Cluster Network Operator configuration.
|
|
This will be fixed in a future release.
|
|
For more information, see link:https://bugzilla.redhat.com/show_bug.cgi?id=1755908[BZ#1755908].
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* Install the OpenShift Command-line Interface (CLI), commonly known as `oc`.
|
|
* Log in as a user with `cluster-admin` privileges.
|
|
|
|
.Procedure
|
|
|
|
To remove an additional network from your cluster, complete the following steps:
|
|
|
|
. Edit the Cluster Network Operator (CNO) in your default text editor by running
|
|
the following command:
|
|
+
|
|
----
|
|
$ oc edit networks.operator.openshift.io cluster
|
|
----
|
|
|
|
. Modify the CR by removing the configuration from the `additionalNetworks`
|
|
collection for the network attachment definition you are removing.
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operator.openshift.io/v1
|
|
kind: Network
|
|
metadata:
|
|
name: cluster
|
|
spec:
|
|
additionalNetworks: [] <1>
|
|
----
|
|
<1> If you are removing the configuration mapping for the only additional
|
|
network attachment definition in the `additionalNetworks` collection, you must
|
|
specify an empty collection.
|
|
|
|
. Save your changes and quit the text editor to commit your changes.
|
|
|
|
. Delete the NetworkAttachmentDefinition CR for the additional network by running the following command. Replace `<name>` with the name of the additional network to remove.
|
|
+
|
|
----
|
|
$ oc delete network-attachment-definition <name>
|
|
----
|
|
|
|
. Optional: Confirm that the additional network CR was deleted by running the following command:
|
|
+
|
|
----
|
|
$ oc get network-attachment-definition --all-namespaces
|
|
----
|