How to change the OpenShift SDN network plugin during OpenShift 4.x installation
Environment
- Red Hat OpenShift Container Platform
- 4.x
Issue
How to change the Openshift SDN
network plugin during OpenShift 4 installation to Multitenant
?
Resolution
Warning: Note that Red Hat strongly advises against using multitenant isolation mode for new installations. Use the default ovs-networkpolicy instead. See https://access.redhat.com/solutions/4628831 for a better and future proof solution for new installations. The default network isolation mode in OpenShift 4.x is network policy, and this is the recommended network isolation mode to use because of the flexibility it provides. It is not recommended to use any of the other network isolation modes, as this will lead to issues during a possible later migration to another cluster network provider such as OVNKubernetes.
Create the install-config
file with the openshift-install
binary:
$ openshift-install --dir ocp4 --log-level debug create install-config
This will create an install-config.yaml
file in ./ocp4
directory.
Now, create the manifests
using:
$ openshift-install --dir ocp4 --log-level debug create manifests
Then, create the following template:
$ cat <<'EOF' > ocp4/manifests/cluster-network-03-config.yml
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: Multitenant
EOF
Note: Do not modify file
cluster-network-02-config.yml
Note: TheapiVersion
in filecluster-network-03-config.yml
must beoperator.openshift.io/v1
, whereas the API version in filecluster-network-02-config.yml
isconfig.openshift.io/v1
Start the installation with:
$ openshift-install --dir ocp4 --log-level debug create cluster
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments