Use 4.6+
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/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
$ touch manifests/cluster-network-03-config.yml
There should be 3 network configs now.
$ ls -1 manifests/cluster-network-*
cluster-network-01-crd.yml
cluster-network-02-config.yml
cluster-network-03-config.yml
Edit the manifests/cluster-network-03-config.yml
file to look something 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: {}
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OVNKubernetes
ovnKubernetesConfig:
hybridOverlayConfig:
hybridClusterNetwork:
- cidr: 10.132.0.0/14
hostPrefix: 23
hybridOverlayVXLANPort: 9898
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