Use the 4.6 nightlies
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/latest-4.6/openshift-client-linux.tar.gz
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/latest-4.6/openshift-install-linux.tar.gz
Create install-config.yaml
file as you would normally.
$ mkdir ocp4
$ cd ocp4/
$ openshift-install create install-config
Modify the install-config.yaml
file to use OVN
$ sed -i 's/OpenShiftSDN/OVNKubernetes/g' install-config.yaml
Generate the install manifests as you would normally
$ openshift-install create manifests
Copy the existing network config file into a new file
$ cp manifests/cluster-network-02-config.yml manifests/cluster-network-03-config.yml
Modify the apiVersion
of this new config
$ sed -i 's/config.openshift.io\/v1/operator.openshift.io\/v1/g' manifests/cluster-network-03-config.yml
In the manifests/cluster-network-03-config.yml
file, add the defaultNetwork
section. The entire file should look like this.
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
creationTimestamp: null
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
externalIP:
policy: {}
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OVNKubernetes
ovnKubernetesConfig:
hybridOverlayConfig:
hybridClusterNetwork:
- cidr: 10.132.0.0/14
hostPrefix: 23
status: {}
Now you can install the cluster as normal
$ openshift-install create cluster
Once cluster is up, verify that it's using OVN with your defaultNetwork
settings
$ oc get network.operator cluster -o yaml