-
Install kcli
https://kcli.readthedocs.io/en/latest/index.html#deploying-kubernetes-openshift-clusters-and-applications-on-top -
Get a pull secret, save as
openshift-pull-secret.json
https://console.redhat.com/openshift/create/local -
Create a secondary network
kcli create network -c 192.168.20.0/24 secondary -
Create this yaml, save as
parameters.yml
cluster: multi-homing
domain: yourname.corp
version: nightly
tag: 4.14
ctlplanes: 3
workers: 2
memory: 24576
numcpus: 20
disk_size: 60
kubetype: openshift
network_type: OVNKubernetes
pull_secret: openshift-pull-secret.json
extra_networks:
- secondary
sslip: true
- Notes:
sslipis a workaround for node's resolv.conf getting overwritten- A special pull secret is needed for nightly, you can use stable instead or get the secret.
-
Create cluster
kcli create cluster openshift --pf parameters.yml multi-homing -
Install kubevirt
kcli create app openshift kubevirt-hyperconverged
- Note: You can add this to the yaml, and it will include kubevirt in the install.
apps:
- kubevirt-hyperconverged
Thanks Karim Boumedhel for this wonderful tool.
In order to use a custom nightly (thanks Miguel)
kcli create kube openshift --paramfile parameters.yml multi-homing -P version=nightly -P tag=4.17.0-0.nightly-2024-07-09-012629