1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/nw-modifying-operator-install-config.adoc
2020-08-05 20:24:21 +00:00

132 lines
4.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * installing/installing_aws/installing-aws-network-customizations.adoc
// * installing/installing_azure/installing-azure-network-customizations.adoc
// * installing/installing_bare_metal/installing-bare-metal-network-customizations.adoc
// * installing/installing_vsphere/installing-vsphere-network-customizations.adoc
// * installing/installing_gcp/installing-gcp-network-customizations.adoc
// * installing/installing_vsphere/installing-vsphere-installer-provisioned-network-customizations.adoc
ifeval::["{context}" == "installing-bare-metal-network-customizations"]
:ignition-config:
endif::[]
ifeval::["{context}" == "installing-vsphere-network-customizations"]
:ignition-config:
:vsphere:
endif::[]
[id="modifying-nwoperator-config-startup_{context}"]
= Modifying advanced network configuration parameters
You can modify the advanced network configuration parameters only before you
install the cluster. Advanced configuration customization lets you integrate
your cluster into your existing network environment by specifying an MTU or
VXLAN port, by allowing customization of
link:https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/[kube-proxy]
settings, and by specifying a different `mode` for the `openshiftSDNConfig`
parameter.
[IMPORTANT]
====
Modifying the {product-title} manifest files directly is not supported.
====
.Prerequisites
* Create the `install-config.yaml` file and complete any modifications to it.
ifdef::ignition-config[]
* Create the Ignition config files for your cluster.
endif::ignition-config[]
.Procedure
. Use the following command to create manifests:
+
[source,terminal]
----
$ ./openshift-install create manifests --dir=<installation_directory> <1>
----
<1> For `<installation_directory>`, specify the name of the directory that
contains the `install-config.yaml` file for your cluster.
. Create a file that is named `cluster-network-03-config.yml` in the
`<installation_directory>/manifests/` directory:
+
[source,terminal]
----
$ touch <installation_directory>/manifests/cluster-network-03-config.yml <1>
----
<1> For `<installation_directory>`, specify the directory name that contains the
`manifests/` directory for your cluster.
+
After creating the file, several network configuration files are in the
`manifests/` directory, as shown:
+
[source,terminal]
----
$ ls <installation_directory>/manifests/cluster-network-*
----
+
.Example output
[source,terminal]
----
cluster-network-01-crd.yml
cluster-network-02-config.yml
cluster-network-03-config.yml
----
. Open the `cluster-network-03-config.yml` file in an editor and enter a CR that
describes the Operator configuration you want:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec: <1>
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: NetworkPolicy
mtu: 1450
vxlanPort: 4789
----
<1> The parameters for the `spec` parameter are only an example. Specify your
configuration for the Cluster Network Operator in the CR.
+
The CNO provides default values for the parameters in the CR, so you must
specify only the parameters that you want to change.
. Save the `cluster-network-03-config.yml` file and quit the text editor.
. Optional: Back up the `manifests/cluster-network-03-config.yml` file. The
installation program deletes the `manifests/` directory when creating the
cluster.
ifdef::vsphere[]
. Remove the Kubernetes manifest files that define the control plane machines and compute machineSets:
+
[source,terminal]
----
$ rm -f openshift/99_openshift-cluster-api_master-machines-*.yaml openshift/99_openshift-cluster-api_worker-machineset-*.yaml
----
+
Because you create and manage these resources yourself, you do not have
to initialize them.
+
* You can preserve the MachineSet files to create compute machines by using the machine API, but you must update references to them to match your environment.
endif::vsphere[]
ifeval::["{context}" == "installing-bare-metal-network-customizations"]
:!ignition-config:
endif::[]
ifeval::["{context}" == "installing-vsphere-network-customizations"]
:!ignition-config:
:!vsphere:
endif::[]